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).
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.
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 ...