Engine Yard

Rails Books

Antonio Cangiano January 13th, 2008

This page is devoted to recommended books for the reader who wishes to learn how to program in Ruby on Rails. You can click here if you are looking for the best books on Ruby on its own. I divided the Rails books from the Ruby ones because not everyone who’s interested in Ruby is also interested in Rails. In this way I can also provide more space for each of them. If you don’t have a Ruby foundation you may want to grab a couple of books off the Ruby page, since approaching Rails without Ruby skills is a very bad idea. Rails is a web framework written in Ruby for writing web applications in Ruby. Without knowing the language it’s hard to get the most of out the framework. If you can, at least consider reading a Ruby and a Rails book at the same time if you are in a rush to learn Rails.

Keep in mind that Rails 2 introduced a few changes, while most books available today are only covering Rails 1.2. This shouldn’t concern you too much though. Rails is always going to rapidly change; what you need to learn from books is a solid understanding of how the framework works, its best practices, principles, and how to build web applications with it today. There is no point in waiting for months to discover that a new Rails version will come out that makes the (then) newest books obsolete. Both the code documentation and the community will fill in any possible gaps due to a different version being adopted by a book. Below you’ll notice that there is at least one title that is up-to-date, and which covers Rails 2.0.

Rails has been attracting a lot of attention amongst developers and because of this you’ll find plenty of new titles on Amazon’s virtual shelf. Here I recommend what I consider to be the best Rails books out there today.

Books that start from scratch

If you are new to Rails and would love to read a gentle introduction that guides you through the construction of a basic Rails social networking web site, look no further than RailsSpace: Building a Social Networking Website with Ruby on Rails. This book doesn’t expect you to know anything about Rails (or even Ruby) and proceeds at the right pace for a beginner. You won’t build the next Facebook, but it’s a darn good hands-on introduction that won’t disappoint you. It will provide you with a lot of information about how Rails works and, above all, how to get started using Rails in practice. What’s even cooler is that information for Rails 2.0 and updated code is available on the official website. They also publish a DVD version if you prefer to watch rather than read the whole book. Of course the book has more details but may be less enjoyable than watching a movie :).

If are already an experienced web developer and want to learn Rails, “Agile Web Development with Rails: A Pragmatic Guide” will be a good choice. Most Rails programmers used this award winning book in order to learn the framework. It’s both a tutorial and a reference. The second version uses Rails 1.2 and not 2.0, but while being a bit obsolete, it’s still a good guide for the serious developer:

Books that expect a basic Rails knowledge

Those of you who already have a basic understanding of how Rails works, acquired by reading tutorials, writing some sample apps or studying one of the books listed above, may wish to bring their knowledge to a pro level by reading Obie Fernandez’s “The Rails Way“. Obie is one of top Rails programmers in the world and an excellent teacher who placed a wealth of information into this book, so that advanced programmers could get the best out of the Rails framework. By the way, a lot of the information provided is not available anywhere else. This book already covers Rails 2.0 and I can positively say that it’s the single best Rails book ever published to date. By a long shot.

Addison-Wesley Professional Ruby Series is publishing one gem (pardon the pun) after another, and so far they haven’t missed a single beat with their books on Ruby and Rails. I look forward to purchasing more books from them because at this point I know that I can trust them. With O’Reilly is a different story. Some of O’Reilly’s books are brilliant, but others have been less than satisfactory and I ended up bringing them back after two days.

Other must-have Rails books

If you are like me, you learn well by doing, so you don’t really want to miss the Rails Cookbook (updated to RoR 1.2):

And if you are interested in Ajax (you should be), then both of these books will be very enlightening for you:

For professionals looking for detailed information about specific topics, I highly recommend the following combo.

This “book” is in reality a box that comes with a CD (in a nice round case) that contains 5 pdf ebooks that can also be purchased individually. The advantage of buying the CD is that it’s much cheaper and will give you a series of specialized ebooks which you will need eventually. These are part of the Short Cuts series from Addison-Wesley and are written by some of the leading figures in the Ruby community. It contains:

  • Mongrel: Serving, Deploying, and Extending Your Ruby Applications
  • Rails Plugins: Extending Rails Beyond the Core
  • Rails Routing
  • Rails Refactoring to Resources: Using CRUD and REST in Your Rails Application
  • Rubyisms in Rails

The short printed book contained in the box has three chapters: ‘RESTful Blogs’, ‘OOP and Dynamic Features in Ruby’, and ‘Working with Active Record’. Each of the three chapters comes respectively from ‘RailsSpace’, ‘The Ruby Way’, and ‘The Rails Way’ we talked about. If you are serious about Rails, this box is packed with interesting and specialized information.

Finally, there are a couple of books that are coming out this month, which warrant a lot of consideration based on the fundamental topics which they deal with and the credentials of their authors (Heads up: I’ve not actually read either of those two books yet, but I’ve no doubt about their worth. I’ll purchase both when they become available and remove them should they not be suitable):

Go to the Recommended Ruby Books



Fine print (nah, just kidding…)

  • The links to Amazon contain my referrer id, so when you buy any books through these links, you also indirectly support this site (and for this I respect and thank you). It doesn’t cost you anything and it gives me a little boost to recoup the hosting expenses and dedicate some of my spare time to the blog.
  • The books mentioned above are some of what I consider to be the best literature available today on the subjects at hand, based on my experience, those of my colleagues and possibly the opinions shared by most of the Ruby and Rails community members. There are plenty of good books published every month though, and if you’ve bought any of them or intend to buy one, you will probably be very satisfied nevertheless. That said be aware that amongst the huge number of Ruby and Rails books being sold on the shelves at the moment, there are a few bad apples that I wouldn’t recommend at all. I won’t name the titles (for now), but beware and read amazon reviews if you decide not to stick to my recommendations.
  • Books are very helpful and you should definitely read them and keep a few on hand for reference. Remember though that in order to succeed at programming, there is no substitute for gaining experience by coding in practice. This means that along with a tutorial, you should also get those “how to” type of books and follow them by reproducing the code and by applying the acquired skills to your own programs.

Updated: January 2008

  • Comments(0)

Comments are closed.