Migration Error

I started following the instructions on RailsRocket to migrate to Rails
2.0. I entered the following commands (as root):

   gem install rails -y
   gem update --system

The two commands seemed to work correctly, but for all intents and
purposes, everything is now broken, and I could go no further.

If I issue any rake command, I get:
   /usr/bin/rake:17: undefined method `require_gem' for main:Object

If I issue a rails command, I get
   /usr/bin/rake:17: undefined method `require_gem' for main:Object

If I issue a gem command I get:
  /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Can anyone offer some help on how to recorver?

Thanks in advance

are you on debian/ubuntu?

I've asked because I had same problem on debian.
gem update --system uploaded files to different location, than apt-get
did, so some files were updated, while others kept obsolete.
After working on the problem a bit, I wiped out ruby (it was 1.8.5 and
no newer version, even in testing repository) and gems completely and
compiled everything from the sources.
No more problems I've got.
However, I'd suggest adding require 'rubygems/gem_runner' to /usr/bin/
gem and run 'gem update' before going my way.