coding

javascript

rbenv can't change global ruby version

If you installed a ruby version in your mac using rbenv you may encounter with this issue.

/rbenv%20can't%20change%20global%20ruby%20version

Problem

I installed a ruby version using rbenv and it keeps returning the Mac OS X default ruby version.

Solution

You need to add the following lines to your ~/.bash_profile.

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