LoginSignup
9
9

More than 5 years have passed since last update.

zsh + tmux で rbenv など*env系が動作しない時

Last updated at Posted at 2014-02-23

zsh + tmux 環境でrbenvなどの*envを利用している場合にうまくバージョン設定を解決できない場合がある。

環境変数$PATHを確認し(cf: echo $PATH | perl -pe 's#:#\n#g')、
もし /path/to/*env/shims よりもglobalなPATHを参照するような設定になってしまっている場合、
.zprofile.bash_profileなどで

PATH=$(cat /etc/paths /etc/paths.d/* | tr -s "\n" ":") # defaultのPATH設定
PATH=${PATH%:}

のようにPATHをresetするような記述を入れておくとうまくいく。
(上記はmacの場合)

9
9
0

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
9
9