Basically the problem was that I did not add rbenv/bin/rbenv to $PATH .
export PATH="$HOME/.rbenv/bin:$PATH"
Even better, add this to your .bashrc or .bash_profile to start each session with rbenv .
After that, make sure that:
eval "$(rbenv init -)"
To enable pads and auto-complete.
fishshell
For those who use fish, you can do the same:
if status --is-interactive . (rbenv init - | psub) end
Now, if you don't like modifying $PATH directly and owning /usr/local/bin , a more elegant solution is symlink with ~/.rbenv/bin/rbenv .
ln -s ~/.rbenv/bin/rbenv /usr/local/bin
ruby build
As a final warning, be sure to install ruby-build (a rbenv ) to add the install command to rbenv and you can easily install Ruby versions.)
If you use homebrew , it's just like a pie:
brew install ruby-build
source share