Quick Tip: Fix gem runner name error
Posted by Vince Wadhwani on Jan 03, 2008
I was updating one of my Dapper Drake installations today when I noticed my ruby gems were ancient (0.9.0 or something). I followed my own instructions and ended up with an error that said:
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)
No problem, I thought.. I'll just reinstall gems from scratch via rubyforge. But when I ran into the same error afterwards I knew I had a problem. Fortunately the fix isn't that hard.
Simply go to the /usr/bin directory and edit the gem file:
sudo vi /usr/bin/gem
Once you're in that file, add this line right below the one that says require 'rubygems':
require 'rubygems/gem_runner'
With that done, gem -v and all subsequent gem activities should work again. My thanks to Nick Peters for finding this. The only reason I blogged it is b/c his site was down and I get nervous about losing goodies like this!