jacobswanner

Upgrading to Rails 3.1.1

Often when we start a new application, we’ll use the latest version of Rails available - even if that version happens to be a prerelease. Unfortunately, as new versions are released, it can be difficult to know what steps need to be taken to upgrade your applications.

There are many times when just modifying the Rails gem version in your Gemfile and then running bundle update seems to work: your tests still pass, application runs like normal, etc. So, you never think twice and go about continuing to develop your application. But, were there other changes that could/should have been made as well? Perhaps Rails has changed the default value for some configuration setting; perhaps release candidates did not deal with assets in the same way the final release did. If you are using prerelease versions, more things tend to change as newer versions come out.

What the Rails application generator creates is specific to the version of Rails it was generated for. So, as new versions are released, what the application generator creates changes; and, comparing the output of different versions can give you some understanding of the changes going on in Rails. So, to that end, I generated applications for the following versions: 3.1.1, 3.1.1.rc3, 3.1.1.rc2, 3.1.1.rc1, 3.1.0, 3.1.0.rc8, 3.1.0.rc6, 3.1.0.rc5, 3.1.0.rc4, 3.1.0.rc3, 3.1.0.rc2, 3.1.0.rc1, 3.1.0.beta1 (3.1.0.rc7 has been yanked from RubyGems); then compared all of them to version 3.1.1. I’ve made a gist for each of the comparisons:

Hopefully, this will come in handy for anyone else - like me - that needs to update some applications that were generated with a Rails version prior to 3.1.1. And, as you can see, depending on what version you used to generate your application, the changes needed will vary.

- Jacob Swanner

(Source: jacobswanner.com)

10.07.11 ← See All Posts
blog comments powered by Disqus