The 5 best Ruby Books of all time for advanced programmers

A data-backed answer



There are countless lists on the internet claiming to be the list of must-read Ruby books and it seemed that all those lists always recommended that same books minus two or three odd choices.

Finding good resources for learning programming is always tricky. Every-one has its own opinion about what book is the best to learn, and as we say in french, “Color and tastes should not be argued about”.

However I though it would be interesting to trust the wisdom of the crown and to find the books that appeared the most in those “Best Ruby Book” lists.

If you want to jump right on the results go take a look below at the full results. If you want to learn about the methodology, bear with me.

I’ve simply asked Google for a few queries like “Best Ruby Books” and its variations of. I have then scrapped all those pages (using ScrapingBee, a web scraping API I’m working on).

I’ve deduplicated the links and ended up with nearly 4 links. Using the title of the pages I was also able to quickly discards:

I ended up with almost 3 HTML files. I went on opening all the files on my browser, open my chrome inspector, found and wrote the CSS selector matching book titles in the article. This took me around 1hours, almost 30 seconds per page.

This also allowed me to discard even more nonrelevant pages, and I discarded a lot. In the end I compiled around 2 lists into this one.

Book titles were then extracted with manuel extraction and some web scraping.

I ended up with a huge list of books, not usable without some post-processing.

To find the most quoted Ruby books I needed to normalize my results.

I had to play with all the different variation like “{title} by {author}” or “{title} - {author}”.

Or “{title}:{subtitle}” and “{title}”, or even all the one containing edition number.

And afterquite a bit of manual cleaning.

My list now looked like this:

From there it was easy to compute the most recommended books. You can find all the data used to process this list on this repo. Now let’s take a look at the list:

I've also recently used some data from different book sellers in order to not forget important books and try to give more weight to books with incredible reviews.



Rails AntiPatterns: Best Practice Ruby on Rails Refactoring (Addison-Wesley Professional Ruby) (Addison-Wesley Professional Ruby Series)

Chad Pytel / Tammer Saleh Pytel / Saleh
% recommend
🛒   Buy
The Complete Guide to Avoiding and Fixing Common Rails 3 Code and Design Problems As developers worldwide have adopted the powerful Ruby on Rails web framework, many have fallen victim to common mistakes that reduce code quality, performance, reliability, stability, scalability, and maintainability. Rails™ AntiPatterns identifies these widespread Rails code and design problems, explains why they’re bad and why they happen—and shows exactly what to do instead.

The book is organized into concise, modular chapters—each outlines a single common AntiPattern and offers detailed, cookbook-style code solutions that were previously difficult or impossible to find. Leading Rails developers Chad Pytel and Tammer Saleh also offer specific guidance for refactoring existing bad code or design to reflect sound object-oriented principles and established Rails best practices.

With their help, developers, architects, and testers can dramatically improve new and existing applications, avoid future problems, and establish superior Rails coding standards throughout their organizations. This book will help you understand, avoid, and solve problems with Model layer code, from general object-oriented programming violations to complex SQL and excessive redundancy Domain modeling, including schema and database issues such as normalization and serialization View layer tools and conventions Controller-layer code, including RESTful code Service-related APIs, including timeouts, exceptions, backgrounding, and response codes Third-party code, including plug-ins and gems Testing, from test suites to test-driven development processes Scaling and deployment Database issues, including migrations and validations System design for “graceful degradation” in the real world

Ruby Under a Microscope: An Illustrated Guide to Ruby Internals

Pat Shaughnessy
% recommend
🛒   Buy
Ruby is a powerful programming language with a focus on simplicity, but beneath its elegant syntax it performs countless unseen tasks. Ruby Under a Microscope gives you a hands-on look at Ruby's core, using extensive diagrams and thorough explanations to show you how Ruby is implemented (no C skills required).

Author Pat Shaughnessy takes a scientific approach, laying out a series of experiments with Ruby code to take you behind the scenes of how programming languages work. You'll even find information on JRuby and Rubinius (two alternative implementations of Ruby), as well as in-depth explorations of Ruby's garbage collection algorithm.

Ruby Under a Microscope will teach you: How a few computer science concepts underpin Ruby's complex implementation How Ruby executes your code using a virtual machine How classes and modules are the same inside Ruby How Ruby employs algorithms originally developed for Lisp How Ruby uses grammar rules to parse and understand your code How your Ruby code is translated into a different language by a compiler No programming language needs to be a black box. Whether you're already intrigued by language implementation or just want to dig deeper into Ruby, you'll find Ruby Under a Microscope a fascinating way to become a better programmer

Agile Web Development with Rails 6

Sam Ruby & David B. Copeland & Dave Thomas
% recommend
🛒   Buy
Learn Rails the way the Rails core team recommends it, along with the tens of thousands of developers who have used this broad, far-reaching tutorial and reference. If you're new to Rails, you'll get step-by-step guidance.

If you're an experienced developer, get the comprehensive, insider information you need for the latest version of Ruby on Rails. The new edition of this award-winning classic is completely updated for Rails 6 and Ruby 2.6, with information on system testing, Webpack, and advanced JavaScript.

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly - you concentrate on creating the application, and Rails takes care of the details. Rails 6 brings many improvements, and this edition is updated to cover the new features and changes in best practices.

We start with a step-by-step walkthrough of building a real application, and in-depth chapters look at the built-in Rails features. Follow along with an extended tutorial as you write a web-based store application.

Eliminate tedious configuration and housekeeping, seamlessly incorporate Ajax and JavaScript, send and receive emails, manage background jobs with ActiveJob, and build real-time features using WebSockets and ActionCable. Test your applications as you write them using the built-in unit, integration, and system testing frameworks, internationalize your applications, and deploy your applications easily and securely.

New in this edition is coverage of Action Mailer, which allows you to receive emails in your app as well as ActionText, a zero-configuration rich text editing feature. Rails 1.0 was released in December 2005.

This book was there from the start, and didn't just evolve alongside Rails, it evolved with Rails. It has been developed in consultation with the Rails core team.

In fact, Rails itself is tested against the code in this book. What You Need: All you need is a Windows, Mac OS X, or Linux machine to do development on.

This book will take you through the steps to install Rails and its dependencies. If you aren't familiar with the Ruby programming language, this book contains a chapter that covers the basics necessary to understand the material in the book.

Metaprogramming Ruby 2: Program Like the Ruby Pros (Facets of Ruby)

Paolo Perrotta
% recommend
🛒   Buy
Write powerful Ruby code that is easy to maintain and change. With metaprogramming, you can produce elegant, clean, and beautiful programs.

Once the domain of expert Rubyists, metaprogramming is now accessible to programmers of all levels. This thoroughly revised and updated second edition of the bestselling Metaprogramming Ruby explains metaprogramming in a down-to-earth style and arms you with a practical toolbox that will help you write your best Ruby code ever.

Dig under the surface and explore Ruby's most advanced feature: a collection of techniques and tricks known as metaprogramming. In this book, you'll learn metaprogramming as an essential component of Ruby and discover the deep, non-obvious details of the language.

Once you understand the tenets of Ruby, including the object model, scopes, and singleton classes, you're on your way to applying metaprogramming both in your daily work assignments and in your fun, after-hours projects. Metaprogramming Ruby, Second Edition makes mastering the language enjoyable.

The book is packed with: Pragmatic examples of metaprogramming in action, many of which come straight from real-life gems such as Rails. Programming challenges that let you experiment and play with some of the most out-there metaprogramming concepts.

Metaprogramming "spells"--33 practical recipes and idioms that you can study and apply right now, to write code that is sure to impress. This completely revised new edition covers the new features in Ruby 2.0 and 2.1, and contains code from the latest Ruby libraries, including Rails 4.

Most examples are new, "from the wild," with more recent libraries. And the book reflects current ideas of when and how much metaprogramming you should use.

Whether you're a Ruby apprentice on the path to mastering the language or a Ruby wiz in search of new tips, this book is for you. What You Need: Ruby 2.x, Ruby 1.9, or a recent version of JRuby.

Agile Web Development with Rails 4 (Pragmatic Programmers)

Sam Ruby & Dave Thomas & David Heinemeier Hansson
% recommend
🛒   Buy
Rails just keeps on changing. Both Rails 3 and 4, as well as Ruby 1.9 and 2.0, bring hundreds of improvements, including new APIs and substantial performance enhancements.

The fourth edition of this award-winning classic has been reorganized and refocused so it's more useful than ever before for developers new to Ruby and Rails. Rails 4 introduces a number of user-facing changes, and the ebook has been updated to match all the latest changes and new best practices in Rails.

This includes full support for Ruby 2.0, controller concerns, Russian Doll caching, strong parameters, Turbolinks, new test and bin directory layouts, and much more. Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly.

You concentrate on creating the application, and Rails takes care of the details. Tens of thousands of developers have used this award-winning book to learn Rails.

It's a broad, far-reaching tutorial and reference that's recommended by the Rails core team. If you're new to Rails, you'll get step-by-step guidance.

If you're an experienced developer, this book will give you the comprehensive, insider information you need. Rails has evolved over the years, and this book has evolved along with it.

We still start with a step-by-step walkthrough of building a real application, and in-depth chapters look at the built-in Rails features. This edition now gives new Ruby and Rails users more information on the Ruby language and takes more time to explain key concepts throughout.

Best practices on how to apply Rails continue to change, and this edition keeps up. Examples use Concerns, Russian Doll caching, and Turbolinks, and the book focuses throughout on the right way to use Rails.

Additionally, this edition now works on Ruby 2.0, a new release of Ruby with substantial functional and performance improvements. This edition is for Rails4.0 and beyond.


I hope that you liked this list. Please do not hesitate to check out the other ones I've published.

Keep me updated!

Receive weekly update about best programming books!
Just that, no spam, no bs.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.