Migrate from rails 2.1.1 to 2.2.2

I am working on a project using rails 2.1.1. With the new release of 2.2.2 I want to migrate to the new version. Is there anything I need to change to migrate my 2.1.1 controllers, views, and models?


Don't forget to run the update Rake task

rake rails:update

That will go ahead and make sure it updates any scripts and configs to reflect 2.2.

Once you have 2.2 installed, issue:

rake -T

to view the available tasks, double check it's there and go ahead and fire it off and you'll be up and running.

Good luck!

There aren't any major changes in the way things are done. Here is the list of deprecations

Of course the best way to quickly discover changes is to have a good test suite in place. If you don't have that, I suggest dropping 2.2 into vendor/rails and clicking around the site by hand.

If you have any plugins that break, check GitHub. I had a bunch of plugins break with no official fixes. I searched GitHub and people had already patched them. Made the upgrade much better then it could have been.

Not really. I would have to agree with @dasil003 and say to check deprecations, and run your tests accordingly after updating. However, you'll need rubygems 1.3.1 in order to upgrade, so don't forget to do so, or your app server won't start.

You will also need to blow away your existing /vendor/plugins/activescaffold directory, and replace it with one that is compatible with rails 2.2. Otherwise you'll get the dreaded (and poorly documented) "no method 'pick_template' error".

To do this, you'll need to run the following in your app base directory:

script/plugin install git://github.com/activescaffold/active_scaffold.git -r 'rails-2.2' # add --force if necessary

Next, add: script/plugin install git://github.com/ewildgoose/render_component.git -r rails-2.2

I ran into this migrating from 2.1 to 2.3 but I've read elsewhere that the issue is rampant going from 2.1 to 2.2 as well. Adding to save others the hassle.

Need Your Help

excel Auto input value based on figures in a table

excel vba numbers excel-formula

I require some help, I have a simple table example as below: