Reputation:
I follow this tutorial
Install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Ruby
brew install rbenv ruby-build
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
rbenv install 2.4.0
rbenv global 2.4.0
ruby -v
but output ruby -v still
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
running on mac OS Sierra 10.12
Upvotes: 1
Views: 1233
Reputation: 107117
One of the steps of the installation is this one:
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
Which writes a command into your .bash_profile
.
You need to restart your Bash session (quit the Terminal and open a new one) to take it into effect.
Upvotes: 1
Reputation: 4222
Add eval "$(rbenv init -)"
line to your .bash_profile
.
Works for me.
Upvotes: 0
Reputation: 11
I was having the same issues and mislav's comment here [https://github.com/rbenv/rbenv/issues/939][1] fixed it for me.
Upvotes: 0