P3.0 (Printing) - 17 August 2012

Rails baseline was updated from 3.2.0 to 3.2.6.

errata fixes.

P2.2 - 20 January 2012

This book is written for Rails 3.2.

Unlike Rails 3.1, Rails 3.2 is truly only a minor release and includes few major changes. This book has been updated to reflect these changes.

Here’s an overview of some of the changes:
  • The turn gem, which was introduced in 3.1, was removed in 3.2
  • bcrypt-ruby now needs to be explicitly added to your Gemfile in order to use has_secure_password()
  • Ruby 1.9.3 was released, and is supported
  • Ubuntu 11.10 was released, and is supported
  • rvm notes moved to rvm requirements
  • Automatic Query Explains

For further details, see the release notes.

To run the examples provided in this book, it is important that you install the correct version of Rails, as described in Chapter 1, Installing Rails, on page 3. If you chose to download the examples, as described in Section 4, How To Read This Book, on page xxi, make sure that you select files from the rails32 directory.

To determine the version of Rails that you are running, you can issue rails -v at a command prompt.

P2.1 (Printing) - 14 October 2011

Second Printing.

Rails 3.1 has some significant impacts on you as a Rails developer.
  • Generated code is aware of which version of Ruby you are using. * Asset management is now a core part of Rails. This changes where you place a number of files, and adds a step to deployment. * SCSS is available by default, which changes both the syntax and the organization of all of the stylesheets.
  • JQuery replaces Prototype and Script.aculo.us
  • CoffeeScript is available by default, which changes the syntax of client-side scripts.
  • Migration methods are no longer class methods, and in most  cases are automatically reversible.
  • Default serialization of responses is now JSON instead of XML
  • A has_secure_password method has been added to the model, which encapsulates and standardizes common user password hashing logic.
  • Rack::Cache is enabled by default in production.
  • The mysql2 gem replaces mysql gem.

Sam Ruby has updated the 4th edition of Agile Web Development with Rails to make it Rails 3.1 compatible.

P2.0 - 31 August 2011

Rails 3.1 has some significant impacts on you as a Rails developer.

  • Generated code is aware of which version of Ruby you are using.
  • Asset management is now a core part of Rails. This changes where you place a number of files, and adds a step to deployment.
  • SCSS is available by default, which changes both the syntax and the organization of all of the stylesheets.
  • JQuery replaces Prototype and Script.aculo.us
  • CoffeeScript is available by default, which changes the syntax of client-side scripts.
  • Migration methods are no longer class methods, and in most cases are automatically reversible.
  • Default serialization of responses is now JSON instead of XML.
  • A has_secure_password method has been added to the model, which encapsulates and standardizes common user password hashing logic.
  • Rack::Cache is enabled by default in production.
  • The mysql2 gem replaces mysql gem.

Sam Ruby has updated the 4th edition of Agile Web Development with Rails to make it Rails 3.1 compatible, and we’re making this update available at no charge to existing owners of the ebook.

P1.0 (Printing) - 29 March 2011

  • First Printing

B13.0 - 02 February 2011

  • Final beta, post-production. Now on to typesetting and then to the printer.

B12.0 - 10 January 2011

  • Indexing is done and a number of errata have been addressed.

B11.0 - 24 November 2010

This beta incorporates a substantial amount of feedback from a number of sources including errata, formal reviews, and from the wonderful editor of this book. For the first time since putting this book out in beta, I am going to suggest that if you are well under way with Depot using a previous beta, consider keeping on with that beta. While there have been no major changes, there have been enough minor changes that those that wish to use this book are encouraged to start over.

This draft has also been tested against the Rails 3.0.3 release. No changes were needed to make the code in this book work against that release.

As always, thanks for all of the wonderful feedback via the errata, forums, and other venues. At this time I would like to specifically thank Johnathan Ritzi, David Kapp, and Jason Holloway. If you spot something, it is not too late to make a comment: there will be at least one more errata sweep before final printing.

B10.0 - 29 October 2010

  • This beta introduces a chapter on plugins and completes the first draft. Plugins are not merely an afterthought or an advanced feature of Rails, with Rails 3.0 it is a fully architected way to augment or even replace base Rails functionality.
  • This also completes the first draft. If you spot something missing, now would be an excellent time to report it via the forums or via an errata. After a few weeks of addressing comments it will be onto production where formatting and typographical and indexing glitches will be resolved.
  • This draft has also been tested against the Rails 3.0.1 release. No changes were needed to make the code in this book work against that release.

B9.1 - 08 October 2010

The code download URLs were incorrect in the latest beta. This release fixes them. There are no other changes

B9.0 - 07 October 2010

This release includes a new chapter, Rails’ Dependencies.

B8.0 - 09 September 2010

New in this beta:

  • Chapter 22—Caching
  • Chapter 23—Migrations
  • Chapter 24—Non-Browser Applications

B7.0 - 25 August 2010

We have a new release candidate of Rails, as well as an official release of Ruby 1.9.2. I’m pleased to report that once again, no changes were made to any Rails API that affect the book. Furthermore, the regression that in the first release candidate which broke the ability to build the guides has been addressed.

New with this beta is a chapter on Action View, which covers templates, helpers, layouts, and partials. At this point, all three parts of the Model/View/Controller architecture are covered. Next up will be a chapter on accessing Rails applications from outside of a web server, either directly via APIs or as a web service.

B6.0 - 26 July 2010

The big news is that the release candidate for Rails has officially shipped. The better news is that no API changes were made to Rails that affect the book. Hopefully at this point releases of Rails will be made more quickly, and the API will remain stable.

New with this beta is a chapter on Action Dispatch and Action Controller, which covers both dispatching of requests to controllers, as well as controllers themselves. At this point, two of the three parts on the Model/View/Controller architecture are complete. Next up will be a chapter on Views.

Once gain, thanks for all of the wonderful feedback via the errata, forums, and other venues—keep it coming!

B5.0 - 28 June 2010

  • The changes to Rails that affected this book in beta 4 was the requirement to specify the keyword ‘new’ when creating a new application with the ‘rails’ command, and the fact that Rails 3.0 no longer works on Ruby 1.9.1. Ruby 1.9.2 preview 3, however, has come out and Rails 3.0 works just fine on it. This beta has been updated to reflect these changes.
  • This beta also adds a chapter dedicated to Active Record, a topic which covered three chapters in edition 3. The content has been updated to reflect Rails 3 APIs, and in particular ARel functionality. The content has been streamlined to focus only on APIs that everybody needs to know, as well as content that was adequately covered in Part II. It also reads less like a reference manual, and more like a guide.

B4.0 - 28 May 2010

This beta adds two chapters. The first recaps what was learned in part 2: model, view, controller, configuration, testing, and deployment. It then continues with an explanation on how to generate documentation for your application.

Chapter 18 is also new with this beta: it goes directory by directory through your Rails application, describing what goes into to each. You will see how to generate documentation for Rails itself, how to build a Rake task, more information on configuration options and naming conventions. This all sets the stage for the chapters that follow.

The Rails team is in the process of deprecating config.log_path, but at the present time has not settled on its replacement. Furthermore this property is broken in Rails 3 beta 3. What you see in Section 16.3, Dealing with Log Files, on page 248 reflects what currently works, which may not necessarily be what will be supported in the final release.

B3.0 - 11 May 2010

This beta adds a deployment chapter which takes you through the installation, configuration, and usage of a number of tools: Apache, Capistrano, MySQL, and Passenger; as well as (mildly) deeper usage of Git and Bundler.

There’s not been another beta of Rails yet, so this is just a FYI at this point, but usage of {{name}} syntax in i18n strings will be deprecated; the preferred syntax is now %{name}.

B2.0 - 03 May 2010

This new release adds coverage of sending mail and integration testing in the new chapter, “Task H: Sending Mail.” You’ll learn how to send mail, how to function test mail, and how to integration test an end-to-end scenario spanning adding a product to a cart to the sending of a confirmation email.

B1.0 - 14 April 2010

  • First beta