Fixing: uninitialized constant Gem::GemRunner (NameError) – Ubuntu
After upgrading to the newest version of rails (2.2.2) I was getting this error:
administrator@shuttle:~/$ gem -v /usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009. /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)
Anytime I called “gem” I would get this error and could not get past.
Here is the fix
administrator@shuttle:~/$ sudo vim /usr/bin/gem
Change the top of the file to look like this:
require 'rubygems' require 'rubygems/gem_runner' #Gem.manage_gems
Save and when you run this you should see this:
administrator@shuttle:~/$ gem -v 1.3.1
You should no longer get the error with running “gem”

22 Responses to “Fixing: uninitialized constant Gem::GemRunner (NameError) – Ubuntu”
Thaaanks Nick!!! You saved my hours of pain!!!
Thanks, that’s really helped us out
Have a great XMAS too…
Thank you I wish I found this earlier last night I was up going crazy.
Thanks a lot, man!
You are a life saver! I was ripping my hair out trying to get this working!
Appreciated!
Thanks..a lot….That saved a lot of time..!!!!
Thank you…again…
You have saved me hours of pulling my hair out over this. Thank you.
thanks for posting this, fingers crossed but this seems to work with a Debian install as well.
yep, worked on debian etch package as well. was about to give up on my rails setup.
Hey, thanks, very useful, save me a headache.
Well, that got gem working again…Sort of. When I try sudo gem install rails-1.2.5 it gives the “cannot find this package anywhere” crap again.
Thank you very much… That is very usefull and save me hours.
thank you very much………..its very helpful……
media-scientific - IT Blog » Blog Archive » Rubygems ERROR - Warning: Gem::manage_gems… - March 4th, 2009
[...] Englische Quelle ist hier zu finden. Tags: rubygems Posted in Ruby on März 4, [...]
Thanks, works for me (Ubuntu / Linux 2.6.24-19)
Thank you so much!
Thanksa lot
Thank you so much…I was completely stumped
Thank you!
Thanks, it is rediculous that this has been left!!
Thanks a bunch!
Thank you, much !!
Width love? from Russia ! )))
Leave a Reply