Reputation: 15008
I installed ruby as per instructions given here but when I do ruby--version then it still shows 1.8.7. How do I make sure I use newly installed Ruby?
Upvotes: 0
Views: 95
Reputation: 66867
Did you properly setup your PATH
? What's the output of echo $PATH
? /usr/local/bin
has to come first they way this tutorial sets up things. You see that everything worked right when which ruby
displays /usr/local/bin/ruby
.
Personally I'd recommend using a tool for managing Ruby versions though. RVM still seems to be the most popular choice, I prefer the combination of rbenv and ruby-build.
Upvotes: 0
Reputation: 543
I would suggest you to use RVM (Ruby Version Manager). You may find a full installation guide here:
http://ryanbigg.com/2011/06/mac-os-x-ruby-rvm-rails-and-you/
If you get an error such as "ERROR: Error running ' ./configure...." after executing rvm install e.g.
rvm install 1.9.3
Then you may try to install it like this:
rvm install 1.9.3 --with-gcc=clang
Note: in the guide this possible error is not described
Upvotes: 3