O'Reilly logo

Learning Rails 3 by Edd Dumbill, Simon St. Laurent, Eric J Gruber

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. An Incredibly Brief Introduction to Ruby

Fortunately, you don’t need to know a whole lot of Ruby to get real work done with Rails. The creators of Rails have used many of Ruby’s most advanced features to make Rails easy to work with, but fortunately you can enjoy the benefits without having to know the details. This appendix explains the basics you’ll need to perform typical tasks in Rails and should help you get started. For a lot more detail on Ruby, try Learning Ruby (O’Reilly, 2007), The Ruby Programming Language (O’Reilly, 2008), The Well-Grounded Rubyist (Manning, 2009), or Programming Ruby (Pragmatic Programmers, 2009).

Note

If you’ve never worked with a programming language before, this appendix may go too fast for you. It’s hard to be incredibly brief and cover the basics at the same time. However, if you’ve worked with JavaScript before, you should be able to get started here.

Ruby is a beautiful but sometimes mystifying language, and probably a better choice as a second language to learn rather than a first language.

Because this is a Rails book, examples will work inside of the Rails framework, in a Rails view and controller, rather than from the command line. If you haven’t touched Rails before, it makes sense to read Chapter 1 first and get Rails installed, and then come back here for more instruction.

How Ruby Works

Ruby is an object-oriented language. Although it’s often compared to Perl, because Ruby code often looks like Perl, Ruby’s object-orientation goes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required