# Doh! Two versions of Ruby installed!

**URL:** <https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075>\
**Category:** Rails\
**Created:** [August 1, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075 "2009-08-01T19:25:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 1, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/1 "2009-08-01T19:25:30Z")

</div>

Hey all

I installed FXRuby today using macports and i believe it’s installed  
another copy of Ruby in /opt/local/bin/ruby

ls -l `which ruby` # =\> -rwxr-xr-x 2 root admin 13412 Aug 1  
16:50 /opt/local/bin/ruby  
cat 'which gem` | head -n 1 # =\> #!/usr/local/bin/ruby

This means that when I try to start up irb or write ruby in TextMate,  
none of my gems can be found.

LoadError: no such file to load – rubygems

can anybody advise how can I sort this screw-up please !?

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 2, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/2 "2009-08-02T17:20:39Z")

</div>

On Sat, Aug 1, 2009 at 10:24 AM, Gavin[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I installed FXRuby today using macports and i believe it’s installed  
> another copy of Ruby in /opt/local/bin/ruby
> 
> ls -l `which ruby` # =\> -rwxr-xr-x 2 root admin 13412 Aug 1  
> 16:50 /opt/local/bin/ruby  
> cat 'which gem` | head -n 1 # =\> #!/usr/local/bin/ruby
> 
> This means that when I try to start up irb or write ruby in TextMate,  
> none of my gems can be found.

> can anybody advise how can I sort this screw-up please !?

1. remove the new version
2. re-install your gems using the new version
3. fix your PATH so `which ruby` returns your original version

I’d go with door #3, personally 🙂

## HTH,

Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 2, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/3 "2009-08-02T18:15:33Z")

</div>

Phlip wrote:  
[…]

> 1. upgrade to Ubuntu (your Home and End keys will start working, too!)

Huh? Home and End work fine on Mac OS X. So do Ctrl-A and Ctrl-E.

## Best,

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

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 2, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/4 "2009-08-02T18:02:49Z")

</div>

> I installed FXRuby today using macports and i believe it’s installed  
> another copy of Ruby in /opt/local/bin/ruby

A generic follow up:

1. upgrade to Ubuntu (your Home and End keys will start working, too!)
2. use ‘whence ruby’ for more info
3. symlink the ruby you want to a spot higher in the PATH

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 2, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/5 "2009-08-02T23:35:53Z")

</div>

Thanks for the suggestions guys

I opted for completely removing my old build and all of the gems in  
favor of the new one (as it was in opt/local as opposed to usr/local)

It’s been a messy learning experience but all is working fine now,.

:S

On Aug 2, 5:15 pm, Marnen Laibow-Koser \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 3, 2009, 12:31am UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/6 "2009-08-03T00:31:28Z")

</div>

Woa - lets not bring OSX into this.

She’s beautiful!

the issue for me was installing FXRuby through macports which re-  
installed ruby in another location on my hard-drive.

FXRuby and me are to blame!

:S

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 3, 2009, 12:07am UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/7 "2009-08-03T00:07:29Z")

</div>

> Phlip wrote:

> > 1. upgrade to Ubuntu (your Home and End keys will start working, too!)

Marnen Laibow-Koser wrote:

> Huh? Home and End work fine on Mac OS X. So do Ctrl-A and Ctrl-E.

Gavin wrote:

> I opted for completely removing my old build and all of the gems in favor  
> of the new one (as it was in opt/local as opposed to usr/local)

So, other than installing multiple Rubies to several different uncommon  
folders, and making you use two keystrokes for the more common operation  
(moving to the beginning and the end of the lines), Macs are indeed  
God’s  
Gift to Usability!

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 3, 2009, 1:58am UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/8 "2009-08-03T01:58:48Z")

</div>

Phlip wrote:

> > Phlip wrote:
> 
> > > 1. upgrade to Ubuntu (your Home and End keys will start working, too!)
> 
> Marnen Laibow-Koser wrote:
> 
> > Huh? Home and End work fine on Mac OS X. So do Ctrl-A and Ctrl-E.
> 
> Gavin wrote:
> 
> > I opted for completely removing my old build and all of the gems in favor  
> > of the new one (as it was in opt/local as opposed to usr/local)
> 
> So, other than installing multiple Rubies to several different uncommon  
> folders,

As Gavin said, that was user error. Leopard comes with a perfectly fine  
Ruby installation already.

> and making you use two keystrokes for the more common operation  
> (moving to the beginning and the end of the lines),

Get your facts straight, Phlip. In most Mac apps, Home and End _do_ go  
to the beginning and end of the line. Generally Cmd-Home goes to the  
beginning of the file.

(And on my laptop, there’s no keystroke benefit anyway; Home and End  
need the Fn key, and because of the key layout, I can do Ctrl-A and  
Ctrl-E with one hand.)

> Macs are indeed  
> God’s  
> Gift to Usability!

Absolutely. Linux is great for servers, but I’ll take Mac OS for a  
desktop OS any day.

And I have to say, Phlip, I really think that you are God’s Gift to  
Testing, but I’m not sure why you feel it necessary to post  
mean-spirited, inaccurate information like this in other subject  
areas…

## Best,

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

---

<div class="post-metadata">

**Author:** ![dr\_gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Post date:** [August 5, 2009, 1:01pm UTC](https://www.ruby-forum.com/t/doh-two-versions-of-ruby-installed/173075/9 "2009-08-05T13:01:51Z")

</div>

“And I have to say, Phlip, I really think that you are God’s Gift to  
Testing…”

Phil, do you have a blog?

Gavin
