First, you'll need to update Rails and Ruby gem to the desired version. Briefly:
$ sudo gem install rubygems-update $ sudo update_rubygems
and:
$ gem install rails OR $ gem install rails --version "=2.2.2"
If you're using a SCM with powerful (and easy) branching such as Git now might be a good time to make a new branch of your app that you can use to keep your upgrade work separate from the main branch. When your upgrade is finished you can merge that work back in.
$ git checkout -b rails23upgrade
Update your environment.rb to reference the version of Rails you're upgrading to:
RAILS_GEM_VERSION = '2.3'
Then use the built-in rake task to update your configs, javascripts, and bootstrap.
$ rake rails:update
You can upgrade your plugins simply by removing the older plugin and installing a newer one in it's place:
$ rm vendor/plugins/fancy_plugin $ ./script/plugin install fancy_plugin
Of course you may have to change some of your app code or configuration to support the new plugins.
If there is anything constant about Rails it's that it's constantly changing. You may want to read the release notes of the various Rails versions to find out what's new:
If you're updating from a very old version 1.0 you might have a lot of work to do.
As core gets leaner and meaner sometimes features are removed, renamed, or deprecated. You may need to update your app to using a new method or convention.
Often plugins are available for features that have been entirely removed from Rails core:
Each new version of Rails packs more and more punch. Many features now in standard in core were previously available as plugins:
If a newer Rails version has added core functionality that you've been using a plugin for it's probably time to throw that plugin out and switch to the Rails core functionality instead.
Now run your comprehensive test suite. Does everything pass? Pat yourself on the back. If not time to go bug hunting!
Discussion
I changed the “Run your test suite” topic's level and put it under “Dealing with Rails changes”, but I'm not sure whether I'm mistaken.