I ran into an issue recently to which the Googles had no answer for. I was updating a project gemset in rvm with a new project a coder buddy had pushed to Git when the strangest thing happened.
I did the bundle install and ran:
gem update --system
Instead of getting the normal output screen I got this instead.
ERROR: While executing gem ... (NoMethodError) undefined method `version' for nil:NilClass
I tore my hair out for days then did a check on the RubyGems version in my gemset and compared it with the gemset on the remote project. My RubyGems version was 1.5.0 and the remote was 1.5.2. This is pure speculation but it looks like the local project bundle was expecting me to run system update from 1.5.2 and not 1.5.0.
Sooo, how do you fix this? In the spirit of Xzibit memes everywhere you need to update your update so you can update….dawg…
Install the RubyGems update gem via:
$ gem install rubygems-update # again, might need to be admin/root
Then run the upgrade
$ update_rubygems # ... here too
You should now be able to run your
gem update --system with great success