Join 3,440 readers in helping fund MetaFilter (Hide)

Tags:

How to fix rubygems?
August 21, 2008 6:22 PM   Subscribe

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 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/bin
The 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.
posted by Inigo Jones to Computers & Internet (3 answers total) 1 user marked this as a favorite
 
The google cache of the rubygems is working right now, I went to google and searched for ruby gems and hit the cache link and all was there.
posted by bottlebrushtree at 7:37 PM on August 21, 2008


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


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


« Older There's a job opening and it t...   |  Help my mum! Mum needs help t... Newer »
This thread is closed to new comments.