# Problem installing rubygems on Mac OS X 10.5.6

**URL:** <https://www.ruby-forum.com/t/problem-installing-rubygems-on-mac-os-x-10-5-6/164200>\
**Category:** Rails\
**Created:** [March 29, 2009, 10:18pm UTC](https://www.ruby-forum.com/t/problem-installing-rubygems-on-mac-os-x-10-5-6/164200 "2009-03-29T22:18:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stug23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@stug23](https://www.ruby-forum.com/u/stug23)\
**Post date:** [March 29, 2009, 10:18pm UTC](https://www.ruby-forum.com/t/problem-installing-rubygems-on-mac-os-x-10-5-6/164200/1 "2009-03-29T22:18:17Z")

</div>

I just recently started getting back into Rails now that the new Agile  
Web  
Development with Rails book (3rd edition) came out.

I had an old, out-of-date installation of ruby and gem so I tried to  
follow  
the advice found at:

[http://blog.carlmercier.com/2007/12/14/how-to-fix-that-rubygems-mess-on-leopard/](http://blog.carlmercier.com/2007/12/14/how-to-fix-that-rubygems-mess-on-leopard/)

which recommended completely removing the Apple installed ruby and gem.  
After doing so, I then installed using MacPort per the instructions.  
Installation went okay until attempting to update Rubygems per this  
command:

sudo gem update --system

This resulted in an error:

/opt/local/bin/gem:14: undefined method `ruby\_version’ for Gem:Module  
(NoMethodError)

I googled for a solution and found this solution:

[http://cristian.livadaru.net/2008/07/22/how-to-solve-undefined-method-ruby\_version-for-gemmodule-nomethoderror-on-os-x/](http://cristian.livadaru.net/2008/07/22/how-to-solve-undefined-method-ruby_version-for-gemmodule-nomethoderror-on-os-x/)

However after trying that solution I got yet another error:

> gem install -l rubygems-update-1.2.0.gem

/opt/local/lib/ruby/site\_ruby/1.8/rubygems/gem\_runner.rb:18:in  
`initialize': uninitialized constant Gem::CommandManager (NameError) from /opt/local/bin/gem:24:in `new’  
from /opt/local/bin/gem:24

So I am wondering: Why is it so (apparently) difficult to update ruby  
and  
gem on Mac OS X? Is it just me? Or others having this same problem? This  
struggle to get ruby and gem up to date seems antithetical to the ease  
with  
which rails in general seems to work. This kind of makes me wish for an  
‘Instant Rails’ solution for Mac OS X!

Does anyone here have an up-to-date solution for installing ruby 1.8.7  
and  
gem 1.3.1 from scratch on Mac OS X that works?

TIA!

–  
View this message in context:  
[http://www.nabble.com/Problem-installing-rubygems-on-Mac-OS-X-10.5.6-tp22772141p22772141.html](http://www.nabble.com/Problem-installing-rubygems-on-Mac-OS-X-10.5.6-tp22772141p22772141.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![stug23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@stug23](https://www.ruby-forum.com/u/stug23)\
**Post date:** [March 30, 2009, 6:42am UTC](https://www.ruby-forum.com/t/problem-installing-rubygems-on-mac-os-x-10-5-6/164200/2 "2009-03-30T06:42:43Z")

</div>

stug23 wrote:  
[…]

> I had an old, out-of-date installation of ruby and gem so I tried to  
> follow  
> the advice found at:
> 
> [http://blog.carlmercier.com/2007/12/14/how-to-fix-that-rubygems-mess-on-leopard/](http://blog.carlmercier.com/2007/12/14/how-to-fix-that-rubygems-mess-on-leopard/)
> 
> which recommended completely removing the Apple installed ruby and gem.

That link didn’t work, but I can’t for the life of me see why you’d need  
to do that anyway. I’ve had no problems with the Apple-supplied Ruby on  
Leopard. (Things were different on Tiger.)

> This kind of makes me wish for an  
> ‘Instant Rails’ solution for Mac OS X!

You shouldn’t need it on Leopard, but try Locomotive. It was designed  
for Tiger, but I believe it still works.

> Does anyone here have an up-to-date solution for installing ruby 1.8.7  
> and  
> gem 1.3.1 from scratch on Mac OS X that works?

Yes. Just use Apple’s versions and upgrade as necessary. 🙂

> TIA!

## Best,

Marnen Laibow-Koser  
removed\_email\_address@domain.invalid  
[http://www.marnen.org](http://www.marnen.org)

---

<div class="post-metadata">

**Author:** ![stug23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@stug23](https://www.ruby-forum.com/u/stug23)\
**Post date:** [March 30, 2009, 7:35am UTC](https://www.ruby-forum.com/t/problem-installing-rubygems-on-mac-os-x-10-5-6/164200/3 "2009-03-30T07:35:23Z")

</div>

You didn’t need to uninstall Apple’s ruby and gems. Simply install your  
own in a separate folder and then edit your PATH variable to tell the  
system where to look for. What’s the output of $ ruby -v ? is it as  
expected?
