Ruby Books
This page is devoted to recommended books for the reader who wishes to learn how to program in Ruby. You can click here if you are looking for the best books on Rails. I’ve divided the Ruby books from the Rails ones, because not everyone who is interested in Ruby is also interested in Rails. By doing it this way I can also devote more space to each of them. The page you’re reading (the Ruby one) can be viewed as being preparatory for the Rails one, because approaching Rails without Ruby skills (or at least a good book) is a very bad idea. Rails is a web framework written in Ruby for writing web applications in Ruby. Without knowing the language first, it’s hard to get the most of out the framework.
People who are considering learning Ruby will have a variety of skills and technical backgrounds. For this reason, I’ve divided the Ruby page into 4 categories, each responding to the needs of a different type of learner and programmer, from the absolute beginner to the advanced programmer. Identify where you are and consider building up your skills by reading the books suggested in your category and those further along the page. If you are interested in pursuing the study of Rails as well, you can pick up the recommended reading from the Rails page.
Keep in mind that it is absolutely safe to buy a 1.8 Ruby book at this stage, because while Rails 2.0 will no doubt introduce a few changes, they won’t be anything that can’t be picked up very quickly if you already know Ruby 1.8. Also, there are no Ruby 1.9 books out there yet and the 1.9 version is a development release intended as a transition for library and gem makers. So go start learning Ruby today or you’ll end up waiting a long time for no reason.
Which book is right for you?
Absolute Beginner
You have never programmed before. You may know how to write some HTML (or not), or how to copy & paste small scripts off the Web, but you haven’t really ever programmed. If words like “algorithm”, “loop”, or “recursion” puzzle you, this is the right definition of you at the moment.
Beginner
You’ve a basic understanding of programming and have programmed at a beginner level in other languages such as C, C++, Java, PHP, etc… but don’t have any experience in Ruby and don’t have a deep understanding of Object Oriented Programming (OOP). Or you may have successfully completed the “Absolute Beginner” step with Chris Pine’s book or similar material online or offline, and are now ready to get more serious about Ruby.
Despite its title, this is a great book for those who’re interested in programming in Ruby independently from their interest in Rails. That said, it is particularly useful if you are interested in pursuing the study of Rails after have already built up a solid Ruby base. You will be a much better programmer thanks to this book, and when you’re reading the Rails mailing list, full of people with Ruby (not Rails) questions, you will feel like suggesting this book to them, because most of the answers to their questions can be found between its covers. It will teach you, in a comprehensible way, object oriented programming in Ruby and prepare you for the study of Rails (to be pursued through other books) in a very effective manner.
Intermediate
You are an intermediate programmer in Python, Perl, Java, C#, or any other objected oriented programming language and want to learn Ruby the way that most successful Ruby programmers have. You are also considered ‘Intermediate’ if you do not program in other programming languages, but have already read about Ruby and Object Oriented Programming through material of a more introductory nature (such as the book in the Beginner section or one at a similar level).

This book is nicknamed “the Pickaxe” and it’s considered a standard book in the Ruby world (get the second version, the first version is outdated and available for free online). It’s a good book that will teach you a lot of what you need to know to be a successful Ruby programmer. I wouldn’t consider it a beginner book though, as you need to have a decent understanding of programming and object orientation before you can get the best out of it. Every Ruby programmer that I know has this book on their shelf and it’s considered “the Ruby book” for historical reasons, plus its renowned for contributing to the spread of Ruby within the English speaking world.
Advanced
You’re an expert programmer or know Ruby well already, and now you’re looking for a book that will help you polish your knowledge, bring it to a new level, and help you acquire a more idiomatic style of programming. Again, if you are a very experienced programmer in other OO languages this is the right pick for you.

The Ruby Way (2nd Edition) looks like a cookbook, and within its pages you’ll find plenty of how-tos for several common tasks. It is therefore a valuable book if treated as a cookbook, but that’s not the main purpose behind it. The Ruby Way is about learning how to deal with a variety of programming tasks in an idiomatic manner, it’s about taking your existing knowledge of Ruby and polishing it in order to apply it to both simple and complex scenarios. If it’s true that in Ruby there are usually several ways to accomplish something (but to a lesser extent than Perl’s TIMTOWTDI principle), it’s also true that most developers will convey that there is often a best way of doing it. This book is about learning to code that “best way” in Ruby, the Ruby Way. This is the book from which David Heinemeier Hansson, creator of Rails, learned most of what he knows about meta-programming and Ruby. I personally consider The Ruby Way 2nd Edition to be the best Ruby book in print today, a definite must-have, chocked full of practical examples and advanced lessons.
Other essential Ruby books
Have you picked a book from the section above? Good. Now let’s take a look at a selection of other excellent books that you may want to consider.
Ruby Cookbook
The Ruby Cookbook is an invaluable tome that should have a sweet spot on your desktop. It provides more than 800 pages of idiomatic Ruby code recipes for common and very interesting tasks. If you learn by doing, this book alone will be able to give you a great deal of insight into Ruby. Each recipe is throughly explained and will always be at hand, ready to help you out if you are stuck with a given problem. It’s not the type of book that you read cover to cover (unless you want to), but it’s a must have for Ruby programmers of all levels, and it’ll end up getting a lot of use.
Design Patterns in Ruby
Another must have that will awe you. This short (and sweet) book can be read in a matter of a few days, but it concentrates tons of advanced Ruby idioms, “best practices” and design patterns, and is not lacking in handy material. Design patterns vary from language to language. For example a few design patterns which are required in Java, become part of the built-in features of the Ruby language and its standard library. Design Patterns: Elements of Reusable Object-Oriented Software (aka The Gang of Four book) is an awesome book, but you will find that quite a few design pattern implementations are quite specific to C++ and similar languages; overall the book is also quite advanced and difficult for the average programmer. The idea behind “Design Patterns in Ruby” is to create a modern, smaller, and Ruby specific introduction to design patterns. It’s still an advanced text which explores all the fun stuff that Ruby provides programmers with, while being accessible even for those who are relatively new to the language. This is definitely not the book for a complete beginner though, but for anyone with an ardent desire to learn the ins and outs of the power of Ruby’s expressiveness, this title is nothing short of amazing.
Go to the Recommended Ruby on Rails 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.
- I was one of the contributors of the Ruby Cookbook, but my judgement of that particular title is in no way altered by this fact.
Updated: January 2008
If you enjoyed this post, then make sure you subscribe to our RSS Feed.
















