Upgrade RVM and now PATH is broken

homebrewpathrubyrvm

My PATH no longer includes /usr/local/bin even though it is the first line of /etc/paths:

#/etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

$PATH:

$ echo $PATH
/usr/bin:/bin:/Users/meltemi/.rvm/bin

What changed? Well all was working fine until:

Recently updated RVM from 1.24.8 -> 1.25.13 on an OS X 10.9.1 machine with rvm get stable

RVM warned me that there was "old stuff laying around" and to run rvm cleanup all, so I did.

Then I upgraded Ruby rvm upgrade 2.0.0-p353 2.1 migrating gemsets along the way…

Edit:

I'm using zsh:

#~/.zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
...
source $ZSH/oh-my-zsh.sh

# load RVM
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

## from brew info zsh
#Add the following to your zshrc to access the online help:
unalias run-help
autoload run-help
HELPDIR=/usr/local/share/zsh/helpfiles

Best Answer

It is not an issue with rvm, but with homebrew:

Since 15th of December 2013 zsh is not longer build with the --enable-etcdir flag by default. Therefore /usr/libexec/path_helper is no longer used to initialize $PATH and all path in /etc/paths as well as in /etc/paths.d are completely ignored. (I know, I just found out myself and am speechless as well.)

Therefore either run brew update; brew reinstall zsh --enable-etcdir or add the following to your .zshrc:

if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
fi

For more information on why this was removed, check this ticket on github.