rbenv can't change global ruby version

Did you add the following lines to your ~/.bash_profile?

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

See: https://github.com/sstephenson/rbenv#installation


Type $ rbenv version (without "s")

It is possible that output will show a path to the file that is locking the version

2.0.0p451 (set by /path/to/some/directory/.ruby-version)

It is even possible that the file is a hidden file named .ruby-version in your current dir. If its the case just remove that .ruby-version file


I realize that I occasionally set local ruby version in home folder, from which I use terminal by default :) So that's what worked for me:

rm /home/MYUSERNAME/.ruby-version

Tags:

Ruby

Rbenv