According to the README, chruby.sh should be called from .bashrc:
Add the following to the ~/.bashrc or ~/.zshrc file:
source /usr/local/share/chruby/chruby.sh
However, gvim (MacVim) fails to load PATH appropriately unless it's called from .bash_profile instead. Is there any that it shouldn't be placed in .bash_profile?
My understanding is that profile is for login shells, while rc is for all shells (and that Mac treats all shells as login shells). Are there any scenarios where one would expect to need chruby in a non-login shell that does not inherit its path from a login shell?
Specifically, this is :echo $PATH when sourcing chruby.sh from .bashrc:
According to the README,
chruby.sh
should be called from.bashrc
:However, gvim (MacVim) fails to load PATH appropriately unless it's called from
.bash_profile
instead. Is there any that it shouldn't be placed in.bash_profile
?My understanding is that
profile
is for login shells, whilerc
is for all shells (and that Mac treats all shells as login shells). Are there any scenarios where one would expect to need chruby in a non-login shell that does not inherit its path from a login shell?Specifically, this is
:echo $PATH
when sourcingchruby.sh
from.bashrc
:And this is the same command when sourcing
chruby.sh
from.bash_profile
(or.profile
):