$rakeFrom my experience, this probably means that you have installed other versions of rails or some other conflicting gems in your local gem repository (~/.gem).
can't activate rails (= 2.2.2, runtime), already activated rails-2.3.2
How did this happen? Well, you probably installed those gems without using the sudo command.
When you install ruby gems as a user without root or admin privileges, ruby will warn you that you are not installing those gems for the entire system.
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 andDon't worry -- you can recover from this misstep. Those locally installed gems will probably interfere with gems that have been installed system-wide. No problem.
/usr/bin aren't both writable.
WARNING: You don't have /Users/nels.nelson/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
$rm -rf ~/.gem/ruby/*/cache/*BUT WAIT!!
$rm -rf ~/.gem/ruby/*/doc/*
$rm -rf ~/.gem/ruby/*/gems/*
$rm -rf ~/.gem/ruby/*/specifications/*
Don't just delete stuff because you are told to. Examine those directories, and make sure that you have already installed those gems for the entire system. If not you will have to reinstall them for the entire system if you still need to, and if you have admin privileges (you can use the sudo command).
$sudo gem install <your gem>Now that you have removed those gems from your user-local gem repository, you should be able to actually reinstall them. This means that you should make a list of what you had previously installed.