简体   繁体   中英

problem with installing ruby 1.9.2 on OS X 10.6.8

i am new to Mac and Ruby on Rails. so, please do understand me if i am posting a dumb question. but, i have been struggling with this problem for a few days with no progress, so i really need some help.

i installed ruby 1.9.2 with RVM. but, when i type "ruby -v" command after installation, it says that the ruby version i have is 1.8.7. so, i have tried "rvm use 1.9.2" command, but it still says my ruby version is 1.8.7. i even re-installed ruby 1.9.2 using RVM a few more time, but no luck. when i typed "rvm list", it says ruby-1.9.2-p290. does that mean my rvm did install ruby 1.9.2, but for some reason, i cannot even get my RVM switch to ruby 1.9.2 from ruby 1.8.7?

what can i do to use ruby 1.9.2??

[added on Aug. 15th] By the way, I just type "rvm info", and it says "ruby-1.9.2-p290" and then all the other stuff explaning. Does that mean that my rvm already has switched ruby to 1.9.2??? But, then, why "ruby -v" keeps saying ""ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]"???

You're probably using a different rvm set when u open terminal..

Since OS X doesn't come with Ruby 1.9.2.., you are being defaulted to the system installation of Ruby.

CLICK FOR LINK:):)

Check out this link to learn how to set a default Ruby version.

I am writing an answer to my own question for anyone with the same problem that I've suffered!

The problem was with "rvm"!

I updated rvm instead of removing it (in some cases, it would be a good idea to completely remove rvm from your system, and re-install it). I followed rvm instructions: http://beginrescueend.com/rvm/install After updating rvm, I was able to install Ruby 1.9.2(,!), and the problem with "rake" command was gone!!!

I should have suspected rvm sooner, then I wouldn't have wasted one week!

PS Try avoid using sudo when it is not necessary when installing. Someone mentioned that he/she used "sudo" to install when he/she didn't have to, and it just created the same problem as I was having!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM