small medium large xlarge

Agile Web Development with Rails 4


Cover image for Agile Web Development with Rails 4

Agile Web Development with Rails 4


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 book 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.

The new Rails5 edition is available here.

Choose Your Format(s)

  • $56.95 In Stock

    Save $14.00 on the combo pack.

  • $43.95 In Stock
  • $27.00 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

About this Title

Pages: 456
Published: 2013-09-27
Release: P2.0 (2014-03-31)
ISBN: 978-1-93778-556-7

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 Rails 4.0 and beyond.

Learn Rails 4 Online at the Pragmatic Studio

Want to learn how to build Rails 4 apps interactively through engaging videos and hands-on exercises? Check out The Pragmatic Studio’s online Ruby on Rails Programming course.

In this online, self-paced course you’ll learn the fundamentals every Rails developer should know, and how to put all the pieces together, so you can confidently create your first Rails app or jump right into an existing app. Throughout the course you’ll also learn key design principles and practices to help you craft robust and flexible Rails apps.

“One of the best learning experiences I’ve ever had! I’ve gone through many courses and books. From all of these, your Rails course is the best in terms of teaching style, course structure, topics, and being up-to-date with Rails 4.” — Mate Kaszas

Read the reviews .

Contents & Extracts

Full Table of Contents


  • Getting Started
  • Building an Application
    • The Depot Application
    • Task A: Creating the Application
    • Task B: Validation and Unit Testing
    • Task C: Catalog Display
    • Task D: Cart Creation
    • Task E: A Smarter Cart
    • Task F: Add a Dash of Ajax
    • Task G: Check Out!
    • Task H: Sending Mail
    • Task I: Logging In
    • Task J: Internationalization
    • Task K: Deployment and Production
    • Depot Retrospective
  • Rails in Depth
    • Finding Your Way Around Rails
    • Active Record
    • Action Dispatch and Action Controller
    • Action View
    • Caching
    • Migrations
    • Non-Browser Applications
    • Rails’ Dependencies
    • Rails Plugins
    • Where to Go From Here


Sam Ruby is a prominent software developer who is a co-chair of the W3C HTML Working Group and has made significant contributions to many of the Apache Software Foundation’s open source software projects. He is a Senior Technical Staff Member in the Emerging Technologies Group of IBM.

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.

David Heinemeier Hansson is the creator of the Rails framework.

Upcoming Author Events

  • 2017-03-23: Dave Thomas
    Transforming Programming The fundamental principle of agility—optimize for change—is getting increasingly difficult to realize. What to do? That's what this talk is about. (GOTO Nights Chicago)
  • 2017-03-25: Dave Thomas
    A one day tutorial" "Idiomatic Elixir—Growing a Program" (Erlang Factory San Francisco)