Can't get ruby 1.9.3 installed on OSX Mountain Lion
-
27-06-2021 - |
Question
I have home brew installed and rbenv. I've followed these instructions:
http://octopress.org/docs/setup/rbenv/
Everything seems to work flawlessly but when I type
ruby -v
it still says 1.8.7...
Not sure what I'm doing wrong.
Solution
Unix will run the copy of Ruby that it finds first in your search path. Type these commands in Terminal:
echo $PATH
which ruby
The first will show you the order in which Unix is looking for the ruby
command. The second will tell you which ruby
it's finding. You may need to edit the PATH=
command in your .bash_profile or .bashrc to change the order of the search path, e.g.:
PATH=/usr/local/bin:/usr/local/sbin:$PATH
prepends /usr/local/bin and /usr/local/sbin to your existing PATH to tell Unix to search your /usr/local/bin directory before /usr/bin
OTHER TIPS
I have tried MacPorts and Homebrew many times the last couple of years. When it comes to ruby no other system can match RVM.
There are numerous guides online. Google, pick one and go.
NOTE: Octopress bloging system, comes with an rvm-ready bundle which will install and use ruby-1.9.2x, last time I checked :-)