Previously, rbenv plugin was testing if there is

binaries are in ~/.rbenv/bin.
However, rbenv puts binaries in 
~/.rbenv/versions 
thus: testing the earlier mentioned directory 
will not work.

In addition, PATH is already handled by rbenv.
This commit is contained in:
Michele Bologna 2015-05-28 18:41:28 +02:00
commit 1746de3a4d

View file

@ -13,13 +13,12 @@ if _homebrew-installed && _rbenv-from-homebrew-installed ; then
fi
for rbenvdir in "${rbenvdirs[@]}" ; do
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
if [ -d $rbenvdir -a $FOUND_RBENV -eq 0 ] ; then
FOUND_RBENV=1
if [[ $RBENV_ROOT = '' ]]; then
RBENV_ROOT=$rbenvdir
fi
export RBENV_ROOT
export PATH=${rbenvdir}/bin:$PATH
eval "$(rbenv init --no-rehash - zsh)"
alias rubies="rbenv versions"