Fix for “uninitialized constant Gem::GemRunner (NameError)”

I tried upgrading my version of rubygems to the most current version by running
sudo gem update --system
Which introduced this error:
/usr/bin/gem:23: uninitialized constant Gem::GemRunner(NameError)
whenever I tried to run rubygems. On the rails forum, I found a fix for it!
Simply add the line to the file /usr/bin/gem (may be different on a mac)
require 'rubygems/gem_runner'
require 'rubygems'
This fixed the issue in both Ubuntu and OS 10.4.

101 Replies to “Fix for “uninitialized constant Gem::GemRunner (NameError)””

  1. $ apt-get install yum
    ( IMO its the best solution as it will install all the other dependencies )
    hence i was able to install rhc
    Hiiiiiiiiii…Simon ..!!
    Helu Nick ..!!

    the problem was still there, even if i edited /usr/bin/gem file & renaming gim to old

    i revert the RENAME-ing made to /usr/bin/gem

Leave a Reply

Your email address will not be published. Required fields are marked *