Agile Web Development with Rails 8 (PragProg)

Get the comprehensive, insider information you need for Rails 8 with the new edition of this award-winning classic.

Sam Ruby @rubys

with Dave Thomas @pragdave

edited by Adaobi Obi Tulton @aotulton

The eighth major release of Rails focuses on the ability to produce production-ready applications. It achieves this while building upon and retaining the ability to produce fantastic user experiences, and achieves all the benefits of single-page applications at a fraction of the complexity. Rails 8 introduces Kamal 2, Thruster, new database adapters, replaces the asset pipeline, and adds a new authentication generator. The result is a toolkit so powerful that it allows a single individual to create modern applications upon which they can build a competitive business—the way it used to be.

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 8 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. We look in depth 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 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.

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.


Sam Ruby is a Rails Specialist at Fly.io, and previously was President of the
Apache Software Foundation, co-chaired the W3C HTML Working Group, and has made significant contributions to many open source projects and standards.

Dave Thomas, as one of the authors of the Agile Manifesto, understands agility. As the author of Programming Ruby, he understands Ruby. And, as an active Rails developer, he knows Rails.


1 Like

Is there a diff to the rails 7 book? Or some indications about the chapters with rails 8 changes.

1 Like

Yup, I was wondering the same thing, since the 7.2 version of the book is still in beta release.

1 Like

A couple of examples of changes:

Chapter 6 (Task A: Creating the Application):

Rails 8 introduces a new iteration (A3) for making the page update in real time, which is absent in Rails 7.2

Chapter 14 (Task I: Logging In):

This chapter in Rails 8 has notable updates, including new content on authenticating users with simplified code using a generator that utilizes Active Job and Active Mailer

If you purchased Rails7 or 7.2 from pragprog.com, you should have received a separate email yesterday with upgrade information.

If you didn’t, you can contact support@pragprog.com.

1 Like

Additionally, expanded coverage of Active Storage, starting immediately in chapter 6 (image_url is replaced by image, and resulting in a form with file upload).

As the book continues to emphasize scaffolding, all of the code has been updated, most notably the controllers make use of the new Parameters#expect.

The deployment chapter isn’t ready in this beta, but will cover Kamal.

1 Like

Rails still going strong, nice :slight_smile:

1 Like

Not sure if this is the right place to mention this, as it is not errata per se. But I found that once I updated my existing code to Rails 8.0.2 (to match that from Beta 6 of the book), that it would not run. Output follows:

➜ depot git:(master) bin/dev
21:53:45 web.1 | started with pid 8136
21:53:45 css.1 | started with pid 8137
21:53:46 web.1 | => Booting Puma
21:53:46 web.1 | => Rails 8.0.2 application starting in development
21:53:46 web.1 | => Run bin/rails server --help for more startup options
21:53:46 web.1 | Puma starting in single mode…
21:53:46 web.1 | * Puma version: 6.6.0 (“Return to Forever”)
21:53:46 web.1 | * Ruby version: ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin23]
21:53:46 web.1 | * Min threads: 3
21:53:46 web.1 | * Max threads: 3
21:53:46 web.1 | * Environment: development
21:53:46 web.1 | * PID: 8136
21:53:46 web.1 | * Listening on http://127.0.0.1:3000
21:53:46 web.1 | * Listening on http://[::1]:3000
21:53:46 web.1 | Use Ctrl-C to stop
21:53:46 css.1 | ≈ tailwindcss v4.0.14
21:53:46 css.1 |
21:53:46 css.1 | Specified input file ./app/assets/tailwind/application.css does not exist.
21:53:46 css.1 | exited with code 0
21:53:46 system | sending SIGTERM to all processes
21:53:46 web.1 | - Gracefully stopping, waiting for requests to finish
21:53:46 web.1 | Exiting
21:53:47 web.1 | terminated by SIGTERM

Creating the file application.css with the following line (taken from the latest version of the book’s source code) was the solution:

@import “tailwindcss”;

Just putting this here in case it helps someone else.