/usr/bin/gem:4: undefined method `manage_gems’ for Gem:Module (NoMethodError)

Error Symtom: When you try to install $gem install rails or $gem update you get an error message ” /usr/bin/gem:4: undefined method `manage_gems’ for Gem:Module (NoMethodError)”.


Step 1: $sudo vim /usr/bin/gem

Step 2: Search “Gem.manage_gems” and remove it or replace it or comment with #Gem.manage_gems in the gem file

Step 3: Insert a file require ‘rubygems/gem_runner’ so that the first lines of /usr/bin/gem look like this
require ‘rubygems’
require ‘rubygems/gem_runner’

Now the problem fixed.

Ref: http://www.videc.at/2009/04/30/rubygems-undefined-method-manage_gems-for-gemmodule-nomethoderror/



Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: