views:

33

answers:

1

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 getting 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.

+1  A: 

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.)

Larry K
yup, thats the right version... but can i not set the default?
GiH
Try echo $PATH to see what your path is currently set to. The directory for your preferred version of Ruby needs to be listed before other directories that contain an older ver of Ruby.
Larry K
yup followed all the steps, it looks like all i had to do was restart terminal... i really feel like a noob haha! Thanks!
GiH
Good job. And don't be too hard on yourself. The real noobs give up without success.
Larry K