Where's Ruby? Too many Ruby interpreters on OS X

I seem to have two versions of Ruby on my PowerBook. I have been
learning
RoR and walked through the online scripted install of Ruby and Rails
several
weeks ago before I really understood what was going on.

If I open Terminal and type:

ruby -v

I get back:

ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0]

So that looks fine, but I don’t know where my Ruby interpreter is
located. I
realize this when I downloaded and installed the Komodo IDE over the
weekend. When Komodo loads a Ruby I get backs:

Ruby 1.8.2 [powerpc-darwin8.0]

I think this is the default OS X ruby interpreter. In the Komodo
Preferences
I found that Komodo is pointing to /usr/bin/ruby for it’s interpreter. I
thought this was where my Rails programs were going for Ruby but that is
clearly not the case.

I don’t want to have more than one version of Ruby. I know the source
files
for the version that I installed myself are located at

I know my source files are located under my home directory at /src/ruby-
1.8.4. Where should I look for my working Ruby install?

On 5/23/06, Bill Edstrom, Jr. [email protected] wrote:

ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0]

I know my source files are located under my home directory at
/src/ruby-1.8.4 . Where should I look for my working Ruby install?

Type:

which ruby

in the terminal to see where the version of Ruby that is the default is
located.

jt

Bill Edstrom, Jr. wrote:

I seem to have two versions of Ruby on my PowerBook. I have been
learning
RoR and walked through the online scripted install of Ruby and Rails
several
weeks ago before I really understood what was going on.

If it’s the walkthrough I think it is, you installed 1.8.4 in /usr/local
and put /usr/local/bin first in your path. This means from the shell,
you get /usr/local/bin/ruby (which is 1.8.4). If Komodo is hardcoded
to point to /usr/bin (instead of using the path) it’ll get 1.8.2.

You can run which ruby from the shell to confirm my thinking :slight_smile:

If you can configure Komodo and tell it to use a different Ruby, do that
(/usr/local/bin/ruby).

If you can’t, or maybe even if you can’t, I also rm /usr/bin/ruby and
create a symlink there to /usr/local/bin/ruby, just to be sure, but
YMMV.

cd /usr/bin

sudo mv ruby ruby.old
sudo mv ri ri.old
sudo mv irb irb.old
sudo mv rdoc rdoc.old

sudo ln -s /usr/local/bin/ruby
sudo ln -s /usr/local/bin/ri
sudo ln -s /usr/local/bin/irb
sudo ln -s /usr/local/bin/rdoc

This way, if anyone hardlinks to /usr/bin, they’ll get your local
version instead.

Alan

which ruby

in the terminal to see where the version of Ruby that is the default is
located.

Ok, typing “which ruby” give me:

/usr/local/bin/ruby

as predicted in the next email!

Making progress…!!!

Komodo is not hard coded. I can point it to any Ruby interpreter. I was
really just trying makes sure my development enviroment was clean.

Thanks. The RoR community and this list are Awesome!