Ruby is a language that attracts both: those with no programming experience and those who know several languages and want to expand their skills.
Alongside the popular framework, Ruby on Rails, or Rails for short, it’s one of the most accessible and many would say, beautiful programming languages around. Before you can create anything in Rails, you need to understand Ruby and gain some practical experience, which is why these books serve a useful dual purpose in pointing you in the right direction for gaining experience.
Ruby is a dynamic, open-source programming language that focuses on simplicity and maximising a programmer’s productivity. Created and launched by Yukihiro “Matz” Matsumoto in 1995, it achieved mass acceptance and consideration in 2006, with millions of programmers using Ruby to create web applications around the world. It is now in version 2. Since it’s open source, Ruby is free to use, modify and distribute, with millions contributing to the evolution of the language.
Learning Ruby on Rails and gaining an understanding of how to code in in this language effectively is best achieved through online tutorials and courses, and videos. Coverage of those you may find in our previous blog post. Alongside reading, tutorials and videos, when beginning with Ruby On Rails you should always include practical lessons, exercise and experiences. In this article, however, we decided to list the most useful books, which will definitely help you to make a good start here.
Top Ruby Books
The Well-Grounded Rubyist
David A. Black
The Well-Grounded Rubyist is useful for beginners but doesn’t shy away from advanced topics and in-depth explanations. It also means it’s useful for experienced developers (in other languages) wanting to start with understanding Ruby.
Eloquent Ruby is described as “a smooth introduction to Ruby that’s both well organized and enjoyable to read, as it covers all the essential topics in the right order.” Perfect for beginners. The author has made other valuable contributions to the Addison-Wesley Professional series, blogs about Ruby and speaks on the topic around the world.
On the website promoting the eBook – and Clean Ruby Plus Package – the author, Jim Gay, describes problems that many Ruby programmers encounter every day. As applications expand, codebases get complicated and figuring out even simple problems takes longer and longer, especially if you start working on new projects or with new developers.
Jim produced this book and the extra resources to assist coders with these problems. The aim is to “write code that un-complicated the logic and put it in plain view, that would make things so much clearer.” Clean Ruby comes with dozens of positive recommendations.
Avdi Grimm is a prolific contributor to the Ruby ecosystem, the author of two other books – Exceptional Ruby and Objects on Rails – ideal for intermediate and advanced programmers. He is also the “head chef” at RubyTapas and co-host of Ruby Rogues podcast.
Practical Object-Oriented Design in Ruby: An Agile Primer
This book, one of the most well-known Ruby books, is more suitable for intermediate to expert programmers, especially if you are new to Object-Oriented Design. It is considered one of the most useful, practical primers on this subject and the author is a renowned expert on OOP in Ruby.
Metaprogramming Ruby 2: Program Like the Ruby Pros
We only advise picking this up if you are an experienced Ruby developer. Perfect for unearthing “Ruby’s most advanced feature: a collection of techniques and tricks known as metaprogramming.” Some experience is required before you can “discover the deep, non-obvious details of the language”, which this book promises to assist with. The second edition is equipped with 33 practical lessons and covers features in Ruby 2.0 and 2.1.
When you are ready to progress onto Ruby on Rails books, here are some of the most up-to-date we can recommend. There are numerous others around but some are quite outdated now, and it always helps to read these alongside online courses, tutorials or while learning through practical lessons and experience.
Best Ruby on Rails Books
Once you feel confident enough with the language itself, and want to learn Ruby on Rails, we recommend starting with this short list. It includes some of the best Ruby On Rails books on the market, with up-to-date practical examples, lessons and techniques.
Ruby on Rails Tutorial
This tutorial is part of the Learn Enough to Be Dangerous, with everything from monthly Ruby tutorials to a package which includes the most recent eBook and earlier versions, plus an entire screencast tutorial series and 50 hours of video.
The Rails 5 Way (4th Edition)
Obie Fernandez and Kevin Faustino
Obie Fernandez is a prominent Rails advocate, once notorious for attacking the failings of Java and promoting Rails framework. He is an experienced developer and was an editor of the Wesley Professional series of books helping to learn Ruby and Rails.
Agile Web Development with Rails 5
Another book that is worth reading, with the fifth edition updated to include Rails 5 and Ruby 2.2. Perfect for those beginning with Ruby on Rails and developers with plenty of knowledge but not enough practical and theoretical knowledge of Rails.
Whether you are completely new to the language, or framework, or both, this list is a great place to start to understand the language and then the framework many popular web applications are created in. Although there are many other RoR around, in our experience, when you are beginning with Ruby on Rails, these are where it is better to start.