开发者

Installing Ruby on Mac 1.9.2, still getting 1.8.7 even though path changed

I'm on a Mac running 10.6.4 Snow Leopard, and apparently ruby comes ready to go. But I'm new to Ruby, trying to learn the Rails framework, and so i decided to install the latest version 1.9.2. I followed the instructions here, but after I compile and install, when I run ruby -v I'm still getting 1.8.7. Anyone can help a noob out?

When I use which ruby I am get开发者_Python百科ting usr/local/bin/ruby, so the path has changed and is correct.


UPDATE:

It seems I was having issues because I was using two login files to set my path (.bash_login and .profile). You can only use one, and the first one that exists and is readable will be used. I eventually switched to RVM and used .bash_login to load RVM into shell.


Well, the sw isn't lying to you. So something is not as you expect.

Try /usr/local/bin/ruby -v and see what version it is.

Added: Also, try locate ruby|more to see where the ruby files are on your system.

You may need to change your path to use your newly installed copy of ruby.

Added more: did you add the Path to your ~/.profile file as the instructions tell you to do in step 1?

Did you restart your terminal session after changing the ~/.profile file? (Quit and restart terminal.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜