ruby still shows old version

Gustavo Duenas picture Gustavo Duenas · Mar 22, 2013 · Viewed 9.5k times · Source

I have installed or I think is is so a new version of ruby on my osx ppc running leopard 10.5.8 but when I run ruby --version it shows the old one 1.8.7 (default on the machine) but when I run...

find /usr -type f -name \*.rb

it shows ruby2.0.o is on:

/usr/local/lib/ruby/2.0.0/

with all its .rb files.

But when I check using locate ruby

it shows the version 1.8.7 under

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Anytime I check on ruby --version it shows the 1.8.7...how can I change that?

Totally newbie...thanks.

BTW rvm is not installing by anychance or homebrew and My xcode doesn't have downloads.

Answer

mpapis picture mpapis · Mar 22, 2013

Most of the systems today search for programs to run using PATH environment variable. If you did install ruby in /usr/local/lib/ruby/2.0.0/ then you should modify your PATH accordingly:

export PATH="/usr/local/lib/ruby/2.0.0/bin:$PATH"

as for problems with any software you should report the problems you are facing: