Reinstalling rubygems

2020-03-26 11:51发布

问题:

How do you reinstall RubyGems as mentioned in no such file to load -- rubygems (LoadError)?

Running Mac OS X 10.8.2

回答1:

Download it right from the source.

I had massive trouble trying to get gem update --system or gem install rubygems-update working properly.

The only thing that worked was downloading right from the source and just overwriting your old version of RubyGems.

  1. Simply download the latest here (was 2.0.3 at time of writing).

  2. Extract the downloaded archive and cd into the resulting directory.

  3. Run the setup with ruby setup.rb. (You may need to use sudo for this, but try it without first.)

All good!

JP



回答2:

Download the latest version:

wget http://...

unpack the file:

tar xzvf ruby-...

and install it:

cd ruby-...
./configure
make
make install

For control, ruby --version



标签: ruby rubygems