efan1030
efan1030

Reputation: 1

Mac snow leopard: ruby version kept coming back to 1.8.7

I installed ruby 1.9.2 and checked with ruby -v and it was fine (1.9.2) but after I restarted my computer after terminal somehow stopped responding, ruby switched back to 1.8.7. This has happened before and I ended up re-intalling.

Do you know what might have happened?

Thank you so much!

Cheers, eFan

Upvotes: 0

Views: 264

Answers (3)

Kalyan Maddu
Kalyan Maddu

Reputation: 4173

$ curl -L http://get.rvm.io | bash 
$ rvm install 1.9.2  
$ rvm use 1.9.2 --default

Upvotes: -1

Phrogz
Phrogz

Reputation: 303361

Presumably you edited your PATH variable in that one Terminal session, but not for all future sessions. Assuming that you have a symlink from /usr/local/bin/ruby to the correct install, you need to modify your PATH to look in /usr/local/bin before /usr/bin.

Create or edit a file named .profile in your home directory with this line in it:

export PATH="/usr/local/bin:$PATH"

Upvotes: 0

Paul Schreiber
Paul Schreiber

Reputation: 12599

Try:

$ which ruby

And:

$ echo $PATH

I bet you installed ruby in /usr/local/ruby/bin/ruby but are running the one in /usr/bin/ruby.

Upvotes: 3

Related Questions