Bash in Emacs + OSX without finding gems installed through terminal.app?

I run bash in emacs on osx and pulling gems from another place and then terminal.app

in bash:

which gem
/usr/bin/gem

in terminal:

which gem
/opt/local/bin/gem

How to change bash to terminal compliance?

+3
source share
1 answer

I assume that $PATHis different from the emacs bash shell. You can verify this by running this command in each.

echo $PATH

This is the search path used to search for commands. You need to include / opt / local / bin in this.

export PATH="/opt/local/bin:$PATH"

~/.bashrc, bash emacs ( -).


Update:

, Emacs ~/.bash_profile ~/.profile, . , PATH, .

PATH bash_profile bashrc. bashrc, bash_profile.

, ~/.bash_profile.

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

bashrc, bash_profile.

+7

Source: https://habr.com/ru/post/1714783/


All Articles