By Antonio Cangiano, Software Engineer & Technical Evangelist at IBM

Rails Books

This page is devoted to recommended books for the reader who wishes to learn how to program in Ruby on Rails (the framework). You can click here if you are looking for the best books on Ruby (the language) on its own.

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 not a wise idea. Rails is a web framework that’s written in Ruby for writing web applications in Ruby. Without knowing the language it’s hard to get the most out of the framework. If you can, at least consider reading a Ruby and a Rails book at the same time, if you’re in a rush to learn Rails.

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.

A word about Rails versions

Ruby on Rails is a “moving target”. If you pay attention to its history, you’ll quickly notice that there are new releases put out frequently. Because of this, book publishers have an exceptionally hard time keeping up with RoR.

The current version of Rails is 2.3.5, it was released in 2009. Do not make the mistake of considering books on previous Rails 2.x versions obsolete. Buy books on Rails 2.x, and use the same version used within a given book. Don’t worry if it’s Rails 2.1 or Rails 2.2. Afterward, when you understood the principles behind Rails, and have learned how to use them, you’ll be able to quickly upgrade to the latest version. The differences will be minimal in the greater scheme of things.

All the books recommended below are relatively up to date, and make for safe and very worthwhile purchases as of 2010.


Recommended Ruby on Rails tutorial/reference books ordered by difficulty level

Title: Foundation Rails 2
Level: Beginner programmer | No experience with Rails

This book is excellent for beginner programmers who have never worked with Rails before. The author takes a clear and easy to follow approach to teaching all the main concepts behind Rails. With this book you’ll get the “fundamentals”, and as such is a good first book for less experienced developers. It’s worth mentioning the presence of an introduction to Ruby within the book, coverage of Behavior-Driven Development (BDD) through the popular RSpec framework, and the presence of helpful appendices, including Database Design 101.


Title: Ruby on Rails for Microsoft Developers
Level: Beginner to Intermediate programmer | No experience with Rails

This book introduces Ruby on Rails to people who’ve never used it before. Two extensive chapters are dedicated to Ruby itself, so as to help you acquire a deeper understanding of the language before approaching the framework. Ruby on Rails for Microsoft Developers is aimed at people who’re developing on Windows, or who have a .NET or Microsoft background. Typically Windows developers find it challenging to get started in the Rails world, where it’s all but assumed that you already have an understanding of Linux/Mac tools and lingo. This book fills that gap, assumes that you are using Windows and introduces useful comparisons with the .NET and Microsoft world, whenever appropriate. As such this title will be especially beneficial to developers who are accustomed to Microsoft tools, even though it’s general enough to satisfy the needs of programmers who are may not be, and who might be using Linux or Mac OS X.

DISCLAIMER: I wrote this book, so I while I certainly won’t sing my own praises, I’ll simply say that the feedback I’ve received so far has been great. A few people went so far as to say that it’s the best Ruby on Rails introduction they’ve read to date.


Title: Agile Web Development with Rails, Third Edition
Level: Intermediate programmer | No experience with Rails

The third edition, released this year, of the first book that was available on the subject of Ruby on Rails. This is an excellent tutorial for intermediate and experienced developers. Most Rails programmers have used this award winning book in order to learn the framework. It’s broad, far-reaching tutorial and reference. Highly recommended.


Title: The Rails Way
Level: Intermediate programmer | Some experience with Rails

Those of you who already have a basic understanding of how Rails works – which you may have acquired by reading tutorials, writing some sample apps or studying one of the books listed above – might want to bring your knowledge on the subject up 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 most out of the Rails framework. It’s an excellent, extensive reference that will be particularly useful to developers who are already confident about their Rails skills. Covering Rails 2.0, this book is not the most up to date one out there, but it makes up for this by its extensive coverage of topics that are not readily found elsewhere. A must have for any serious Rails developer.


Title: Professional Ruby on Rails
Level: Intermediate programmer | Some experience with Rails

An excellent alternative to Agile Web Development with Rails, provided you already have some knowledge regarding how to use Rails. This book is very focused on “best practices” and Test-Driven Development (TDD), and should bring your understanding of how to use Rails in your projects to the next level. Definitely recommended as a follow-up book for Foundations Rails 2.


Title: Enterprise Rails
Level: Intermediate programmer | Solid experience with Rails

In the Rails community you’ll often notice that there is a certain distrust of all things Enterprise. In a sense, Rails is like David battling it out against the Goliath world that is the Enterprise. This excellently written book goes beyond this stereotype, however, and approaches the subject of using Rails to write Enterprise applications. Enterprise Rails deals with many subjects, including the architecture of complex sites, fully taking advantage of databases, Rails and SOA, as well as caching for improving performance. I loved this book and recommend it to anyone wishing to “get serious” about using Rails beyond the scope of its average limits.


Title: The Art of Rails
Level: Intermediate programmer | Solid experience with Rails

Fantastic “conceptual” book with a very apt title. This book elevates you from a programmer to “architect” of web applications. Though it’s a rather concise book, you’ll be amazed to find a gold mine of information about design patterns for web application development (including AJAX), how to improve your code, understand REST, learn Behavior-Driven Development, and take advantage of Ruby’s advanced techniques to improve your applications and extend Rails to suit your needs. A definite must have for the serious Rails developer.


Other recommended Rails books

There are many books that are either specific to a particular aspect of Ruby on Rails or that deal with subjects strictly related to web application development in Rails. Here I list the most recommendable titles that you may want to include on your bookshelf.

Rails Cookbooks:

Deploying Rails:

Client side development (JavaScript/AJAX/Flex):

Merb:

Rails 3, scheduled to be released in the first quarter of 2010, will be a significant upgrade that will fuse the next version of Rails with a similar framework known as Merb. If you wish to program in Merb until then, or if you want to have a peak at the future, by studying features that are likely to appear in Rails 3, you can’t go wrong with the following book from the “The * Way” series by Addison-Wesley:

Go to the Recommended Ruby Books


The 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 such titles here (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.
  • As I mentioned before, I’m the author of one of the recommended books (Ruby on Rails for Microsoft Developers), but I tried to be objective about it.

Updated: March 2010

Copyright © 2005-2010 Antonio Cangiano. All rights reserved.