I followed this guide: http://samsoff.es/posts/how-to-install-ruby-193
I typed rbenv install 1.9.3-p125
in the console.
Ruby installs OK but when I run ruby -v
it still says version 1.8.7.
What needs to be changed for it to work?
I followed this guide: http://samsoff.es/posts/how-to-install-ruby-193
I typed rbenv install 1.9.3-p125
in the console.
Ruby installs OK but when I run ruby -v
it still says version 1.8.7.
What needs to be changed for it to work?
You need to switch to the new version, one of three ways:
rbenv shell 1.9.3-p125
set a .rbenv-version file inrbenv local 1.9.3-p125
set the defaultrbenv global 1.9.3-p125
rbenv global system
, where "global" could also be "shell", "local".
Commented
Apr 23, 2012 at 19:03
rbenv global 1.9.3-p125
but ruby -v still says 1.8.7?
rbenv version
and rbenv versions
?
Commented
Apr 23, 2012 at 22:56
eval "$(rbenv init -)"
switches the ruby version. After I type that and then ruby -v
I get ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
- BUT - after I restart the terminal and type ruby -v again its back to 1.8.7? What can I do to make it permanent?
echo "hello!"
right after it and see if that is printed when you start a new window/shell/terminal.
Commented
Apr 24, 2012 at 20:05
If the install command isn't working for you with rbenv, you have to install ruby-build.
you should restart the terminal to allow rbenv
$ exec $SHEL
$ ruby -vruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]