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

On Sat, Aug 1, 2009 at 10:24 AM, Gavin[email protected]
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 :slight_smile:

HTH,

Hassan S. ------------------------ [email protected]
twitter: @hassan

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
[email protected]

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

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-

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

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!

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
[email protected]

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

Phil, do you have a blog?

Gavin