Doh! Two versions of Ruby installed!

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 !?

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 :slight_smile:

HTH,

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:

4) upgrade to Ubuntu (your Home and End keys will start working, too!)
5) use 'whence ruby' for more info
6) symlink the ruby you want to a spot higher in the PATH

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

Phlip wrote:

> 4) 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!

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

"And I have to say, Phlip, I really think that you are God's Gift to
Testing..."

Phil, do you have a blog?

Gavin