You need to add two things to your PATH
.
First rbenv
itself and second the ruby shims
.
Part 1 rbenv
Installation
Homebrew
If you installed rbenv
with brew
,
then the rbenv
executable should be linked to /usr/local/bin/rbenv
.
See homebrew installation documentation for details.
Please add /usr/local/bin
to your path PATH
, if it is missing.
# in ~/.zshrc
export PATH=/usr/local/bin:$PATH
Github Checkout
If you install rbenv
via a Github checkout, then the rbenv
executalbe should be stored in ~/.rbenv/bin
.
See github installation documentation for details.
Please add ~/.rbenv/bin
to your path PATH
, if it is missing.
# in ~/.zshrc
export PATH=$HOME/.rbenv/bin:$PATH
Verfiy
Please verify that rbenv
is in your path by calling which rbenv
.
The installation path should be returend.
Part 2 shims
Add the ruby shims
to you path.
# in ~/.zshrc
eval "$(rbenv init -)"
Instead of the eval "$(rbenv init -)"
command you can also add the shims
folder directly.
# in ~/.zshrc
export RBENV_ROOT=$HOME/.rbenv
export PATH=$RBENV_ROOT/shims:/versions:$PATH
Part 3 rbenv doctor
You might also run the rbenv-doctor
script mentioned here,
to check your installation.
.zshenv
is sourced automatically before.zshrc
is. – Chitwoodrbenv
is, in fact, in$HOME/.rbenv/bin
? – Chitwood