Rails 3 Upgrade Made easy !

anand posted this on 16 Sep 2010

With Rails 3 release, existing rails applications are getting upgraded to Rails 3. Rails has so many advantages compared to older versions and its always better to do the upgrade now if not later.

Rails community has churned out a very good plugin for making this step a painless process. You can get this plugin   rails_upgrade  here . Just install the plugin and follow the instructions given in its README file. 

Here are some of the things which you have to take care of.

Ruby versions:
Make sure you run the compatible versions of ruby ( Ruby 1.8.7 or Ruby 1.9.2). If you are not used to working with rvm (ruby version manager), this is the right time. Use rvm to install multiple versions of ruby and install Rails 3 with either ruby 1.8.7 and ruby 1.9.2 and without disturbing your existent environments.

Care has to be taken in the plugins used in the rails application. This is not a fact to be worried about. Most of the popular plugins are upgraded to work with Rails and some plugins work well in the older versions itself.

Cloud Platforms:
If you application is hosted on a dedicated server, its not a problem. You can install the necessary ruby versions and you can start the upgrade process. But when you are in platforms like Heroku, you've got to take care of the ruby version they support. Heroku (at the time of this writing) supports only Ruby 1.8.7. The support for ruby 1.9.2 is on the way as per their Rails 3 help page

Resources for Upgrade
Ryan Bates has done 2 excellent screencasts on how to upgrade your applications to Rails 3. Here is another excellent post that will be of help. Rails 3 release notes gives useful information on this.