How to fix rubygems?
August 21, 2008 6:22 PM
I upgraded ruby on OS 10.5.4 from 1.8.6 to 1.8.7 and rubygems stopped working. How do I get rubygems to see where I've installed ruby?
I chose not to overwrite the ruby that came with OSX and instead installed 1.8.7 in /usr/local/. I did
So, how do I make rubygems work with my installation of ruby.
I chose not to overwrite the ruby that came with OSX and instead installed 1.8.7 in /usr/local/. I did
gem environment
and rubygems is still set up to use ruby 1.8.6:- RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/binThe rubygems directories seem to be scattered about and I can't find a file or a command to change the configuration. Most annoyingly, the rubygems docs are down right now so I can't even access those.
So, how do I make rubygems work with my installation of ruby.
I would recommend installing your own RubyGems as well, inside the /usr/local directory, using your new manually-installed Ruby installation.
Grab the latest version from here, unarchive it, and run
/usr/local/bin/ruby setup.rb
Yes, it means that you'll need to reinstall your gems as well, but if you're moving towards managing your own Ruby instance under /usr/local then this is the sanest way to go, IMHO.
posted by chrismear at 11:27 PM on August 21, 2008
Grab the latest version from here, unarchive it, and run
/usr/local/bin/ruby setup.rb
Yes, it means that you'll need to reinstall your gems as well, but if you're moving towards managing your own Ruby instance under /usr/local then this is the sanest way to go, IMHO.
posted by chrismear at 11:27 PM on August 21, 2008
Alternatively, editing the shebang line in /usr/bin/gem to point at your own Ruby will do what you're asking for.
I just personally feel happier my Ruby in one place and not messing with the system-installed stuff. I have cold sweaty nightmares about an Apple update blowing away my carefully upgraded Ruby and RubyGems installations. (Well, not really. But you get the picture.)
posted by chrismear at 11:35 PM on August 21, 2008
I just personally feel happier my Ruby in one place and not messing with the system-installed stuff. I have cold sweaty nightmares about an Apple update blowing away my carefully upgraded Ruby and RubyGems installations. (Well, not really. But you get the picture.)
posted by chrismear at 11:35 PM on August 21, 2008
This thread is closed to new comments.
posted by bottlebrushtree at 7:37 PM on August 21, 2008