Getting started on Rails upgrade (Rails 1 to Rails 2)

There are plugins now to upgrade from rails 2 to rails 3 (For details look at https://github.com/rails/rails_upgrade). However for rails 1 to rails 3 its a huge jump. So its most advisable to go from rails 1 to rails 2. And then use the plugin to help with the rest of the upgrade.

So when we started off with this task, we found a great post here http://marklunds.com/articles/one/409. It gives a great starting point to get the ball rolling. 

Few things you need to keep in mind, 

1) Steps 1, 2, 3 mentioned in the post above may not be needed if you are not planning to vendorize rails. 

2) Its best to introduce bundler at a point you deem comfortable since that can help you out with managing gem dependencies very comfortably. You can follow the steps given in http://gembundler.com/rails23.html to make bundler work with rails 2.

3) Also when you are looking for corresponding gems or plugins for rails 2, it would be helpful to investigate more into what the plugin/gem actually does since quite a few gem/plugin behaviours got integrated into rails later or new better plugins got introduced for them.

At the same time, if you can’t find options, just investigate more into the errors you get after migrating to rails 2, and try to solve them. It may be as simple as using ActiveSupport::Inflector instead of Inflector, moving inflections to the right place, etc. 

At every point keep referring apidock, guides.rubyonrails.org, rdoc for reference on which methods are deprecated and what are their corresponding alternatives now.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s