Backend & Infrastructure

Best Ruby on Rails Books

9books
2top picks

Editor's top Ruby on Rails books

2
Cover of Agile Web Development with Rails 7
BeginnerPaid★ Top Pick

Agile Web Development with Rails 7

Sam Ruby & Dave Thomas · Pragmatic Bookshelf0

★★★★☆4.02 Google ratings

Builds a shopping-cart application from scratch while introducing the framework, by Sam Ruby and Dave Thomas. Updated for Rails 7.

Cover of Practical Object-Oriented Design: An Agile Primer Using Ruby
IntermediatePaid★ Top Pick

Practical Object-Oriented Design: An Agile Primer Using Ruby

Sandi Metz · Addison-Wesley · 701 pages · ~18 hrs to read

Not a Rails book — a Ruby OOP design book every serious Rails developer reads anyway. Teaches you to write models and services that survive requirements changing out from under them, which most Rails codebases desperately need.

Ruby on Rails Books for Beginners

2
Cover of Agile Web Development with Rails 7
BeginnerPaid★ Top Pick

Agile Web Development with Rails 7

Sam Ruby & Dave Thomas · Pragmatic Bookshelf0

★★★★☆4.02 Google ratings

Builds a shopping-cart application from scratch while introducing the framework, by Sam Ruby and Dave Thomas. Updated for Rails 7.

Cover of The Well-Grounded Rubyist
BeginnerPaid

The Well-Grounded Rubyist

David A. Black & Joseph Leo III · Manning · 613 pages · ~15 hrs to read

The Ruby language book to read before or alongside your first Rails app — objects, blocks, modules, and the object model explained properly instead of picked up by osmosis from tutorials.

Intermediate & Advanced Ruby on Rails Books

7
Cover of Practical Object-Oriented Design: An Agile Primer Using Ruby
IntermediatePaid★ Top Pick

Practical Object-Oriented Design: An Agile Primer Using Ruby

Sandi Metz · Addison-Wesley · 701 pages · ~18 hrs to read

Not a Rails book — a Ruby OOP design book every serious Rails developer reads anyway. Teaches you to write models and services that survive requirements changing out from under them, which most Rails codebases desperately need.

AdvancedPaid

Metaprogramming Ruby 2: Program Like the Ruby Pros

Paolo Perrotta · Pragmatic Bookshelf · 251 pages · ~6 hrs to read

Rails itself is built on heavy metaprogramming — method_missing, define_method, class_eval. This is the book that demystifies how the framework's DSLs actually work under the hood.

Cover of Design Patterns in Ruby
IntermediatePaid

Design Patterns in Ruby

Russ Olsen · Addison-Wesley · 559 pages · ~14 hrs to read

Reworks fourteen of the Gang of Four patterns through Ruby's dynamic typing, closures, and mixins — patterns that show up constantly in mature Rails codebases once you look past scaffolding.

Cover of Rails AntiPatterns: Best Practice Ruby on Rails Refactoring
IntermediatePaid

Rails AntiPatterns: Best Practice Ruby on Rails Refactoring

Chad Pytel & Tammer Saleh · Addison-Wesley · 347 pages · ~9 hrs to read

★★★★☆4.01 Google ratings

Written by thoughtbot founders from years of consulting on other people's messy Rails apps. Cookbook-style: names the anti-pattern, shows the refactor. The fastest way to recognize bad code you've probably already written.

AdvancedPaid

Sustainable Web Development with Ruby on Rails

David Bryant Copeland

Updated for Rails 7, written by a former Stitch Fix chief architect. Focused on the unglamorous discipline of keeping a Rails app cheap to maintain for years rather than fast to ship on day one.

Cover of Crafting Rails 4 Applications
AdvancedPaid

Crafting Rails 4 Applications

José Valim · Pragmatic Bookshelf0

Written by a Rails core contributor (who went on to create Elixir). Eight tutorials on building Rails plugins and engines that teach you how the rendering stack, Rack integration, and streaming actually work internally.

Cover of Layered Design for Ruby on Rails Applications
AdvancedPaid

Layered Design for Ruby on Rails Applications

Vladimir Dementyev · Packt · 298 pages · ~7 hrs to read

Written by a principal engineer at Evil Martians, the consultancy behind much of the modern Rails tooling ecosystem. Tackles the problem senior Rails developers actually hit — fat models and controllers — with concrete layering patterns for service objects, policies, and presenters rather than abstract advice.