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 h开发者_如何学Goave happened?
Thank you so much!
Cheers, eFan
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
.
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"
$ curl -L http://get.rvm.io | bash
$ rvm install 1.9.2
$ rvm use 1.9.2 --default
精彩评论