Got 1.8.5 installed on Macintosh with gems.
Thanks for all your help. I really appreciate you helping me get past
this.
Basically, I put “/usr/local/bin” ahead of “/usr/bin” in my PATH in
~/.profile
Then I re-installed rubygem to “/usr/local” and
$ ruby setup.rb config --prefix=/usr/local
and re-installed all my gems, which automatically installed them into
/usr/local/lib/ruby/gems
Details below…
I think you’ve installed rubygems using /usr/bin/ruby, the Apple’s one ?
Yes. I installed rubygems when Apple’s /usr/bin/ruby was the only
version on my Mac.
may be you didn’t change your PATH hit before ?
You mean change PATH to include /usr/local/bin/ruby before installing
rubygems?
That would be correct, since /usr/local/bin/ruby didn’t yet exist when
I installed rubygems.
personaly in such a situation i would re-install rubygems to insure it
is linked to the right ruby.
Okay, I did succeed re-installing ruby gems
$ cd rubygems-0.9.1
$ ruby setup.rb config --prefix=/usr/local
I figured out which value to pass in to --prefix by looking in
setup.rb:
$ grep setup.rb | grep prefix
_stdruby = “$prefix/lib/ruby/#{version}”
The argument to --prefix should be clarified in
http://docs.rubygems.org/read/chapter/3
Calling “gem environment” now prints nicely:
$ gem environment
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
…