Upgrading to Ruby on Rails 3.0, 3.1 or 3.2 from 2.3.11?

I am going (trying) to upgrade a Rails application from 2.3.11 to 3.X, and I am wondering which others recommend the upgrade path. Right now (March 2012) 3.2 is the latest version of Rails, but I'm wondering if I will be better off focusing on an earlier version to minimize the pain of updating.

In particular, I would like to avoid overshooting the legacy and inherited support mark. For example, if there are parts of the deprecated ActiveRecord that are deprecated in 3.1 and removed in 3.2, I think I would prefer to go to 3.1 or even 3.0.

Current configuration:

  • Rails 2.3.11
  • Ruby 1.8.7 (ree-1.8.7-2012.01 in production)
  • Already upgraded to bundler

If someone went through this and could point to a specific version for the purpose, that would be a big help.

+5
source share
1 answer

I just did this recently and found it very useful to take an incremental approach and follow all the obsolescence warnings when upgrading. If you have good coverage for testing, you can see the obsolescence warnings that erupt when you run the test suite. If not, you'll want to look at your server logs for obsolescence warnings very carefully. One thing that bit me was to change the ERB from using <% to <% = for content blocks when upgrading from 3.0 to 3.1, as they will fail.

+2
source

All Articles