LoginSignup
16
15

More than 5 years have passed since last update.

emacs上でrbenvが使えなくなる件について

Last updated at Posted at 2014-05-13

発端


rspec-mode
ruby使rbenv
rbenv.el使exec-path~/.rbenv/shimsexec-path-from-shell使

path_helper


rpsec-mode調PATH/usr/bin,/binrbenvrubyruby/usr/bin/ruby
rbenvrbenv.el
/etc/zshenv
/etc/zshenv
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
        eval `/usr/libexec/path_helper -s`
fi

が書かれていて、書いてある通りにpath_helperを実行すると

$ /usr/libexec/path_helper -s
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin(略)"

のように標準のpathが先頭について返ってくる。このpathは/etc/pathsに

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



zsh


(一)/etc/zshenv

(二)~/.zshenv

(三)/etc/zprofile ()

(四)~/.zprofile ()

(五)/etc/zshrc ()

(六)~/.zshrc ()

(七)/etc/zlogin ()

(八)~/.zlogin ()


.zhsrc使/etc/zshenv/usr/bin


~/.zshenvrbenv


rbenv
.zshenv
export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init - zsh)"

OK


.zshrcrbenvPATH調
path_helper/etc/zshenvzprofileOS



.emacs
16
15
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

16
15