Updating to rails 2 2 2

If you want to update every gem in the Gemfile to the latest possible versions, run: and your test suite in your back pocket.

Resolving all dependencies from scratch can have surprising results, especially if a number of the third-party packages you depend on have released new versions since you last did a full update.

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_-r 'rails-2.2' # add --force if necessary Next, add: script/plugin install git://github.com/ewildgoose/render_-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.

To illustrate, the probably won't break anything, similar scenarios can happen that involve much larger jumps.

(see [1] below for a larger discussion) In order to avoid this problem, when you update a gem, bundler will not update a dependency of that gem if another gem still depends on it. If bundler needs to update a gem that another gem depends on, it will let you know after the update has completed.

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.

(Runtime Error) You have to install development tools first.

Is there anything I need to change to migrate my 2.1.1 controllers, views, and models?

There aren't any major changes in the way things are done.

If nothing else, it’ll motivate you to get that upgrade done.

When you’re moving to a new Rails version, always upgrade to the newest point version first. So if you want to upgrade from 4.1.6 to 4.2, go 4.1.6 to 4.1.9, and 4.1.9 to 4.2.

Leave a Reply