tmux + rbenv ã®ç°å¢ã§æå®ãã Ruby ã使ãããªã件
以åãtmux + rbenv ã®ç°å¢ã§ãæå®ãããã¼ã¸ã§ã³ã® Ruby ãä½æ ã使ãããªããªã£ã¦ãã¾ã£ã件ãããã¾ããã
tmux + tmuxinator + rbenv ã®ç°å¢ã§ RBENV_VERSION ãåæã«è¨å®ããã¦ãã¾ã件
http://d.hatena.ne.jp/akishin999/20130303/1362308566
ãã®æã¯ä¸ã«æ¸ããéããtmux èµ·åæã« RBENV_VERSION ãè¨å®ãããªãããã«ããäºã§åé¿ã§ããã¨æã£ã¦ãã¾ããã
ããéçºç°å¢ã§ä¹ ãã¶ãã«å¥ã®ãã¼ã¸ã§ã³ã® Ruby ã«åãæ¿ãã¦ã¿ãã¨ãããã¾ããã global 㪠Ruby ãã使ãããªãåé¡ãçºçãã¦ããäºãçºè¦ã
調ã¹ã¦ã¿ãã¨ã©ãããä¸è¨ã®äºè±¡ã®ããã§ãã
tmuxã¨rbenvãä½µç¨ããå ´åã¯.rbenv/shimsã®ãã¹ãéãã¦ãªãã¨ãã¼ã¸ã§ã³æå®ã§ããªã - åã®è»è¼ªã®åçºæ
http://kazuph.hateblo.jp/entry/2013/05/06/200059
The master branch of rbenv breaks inside of tmux. Issue #369 sstephenson/rbenv
https://github.com/sstephenson/rbenv/issues/369
ç°å¢å¤æ° PATH ã確èªãã¦ã¿ãã¨ãã$HOME/.rbenv/shimsãããåã« global 㪠Ruby ã®ãã¹ãè¨å®ããã¦ãã¾ã£ã¦ãã¾ãã
ã©ããããããåå ã§ä¸æãåãæ¿ãã£ã¦ãããªãããã§ãã
å ¬å¼ããã¥ã¡ã³ãã®æ¹ã«ã以ä¸ã®ããã«æ¸ãã¦ããã¾ããã
rbenv works by inserting a directory of shims at the front of your PATH:
https://github.com/sstephenson/rbenv#understanding-shims
試ãã«ä»¥ä¸ã®ããã« export ãã¦ã¿ãã¨ããã®å¾ã¯ã¡ããã¨æå®ãã Ruby ã«åãæ¿ããããã«ãªãã¾ããã
% export PATH=$HOME/.rbenv/shims:$PATH
ã¨ããããã§ãèªåã®ç°å¢ã§ã¯ tmuxinator ã使ã£ã¦ããã®ã§ãtmuxinator ç¨ã® YAML ãã¡ã¤ã«ã§ä»¥ä¸ã®ããè¨å®ãã¦ã¿ã¾ããã
project_name: devel project_root: ~/ pre:_ - export PATH=$HOME/.rbenv/shims:$PATH ã» ã» ã»
ä¸æ¦ tmux ãçµäºãããã®å¾ mux ã³ãã³ã㧠tmux ãèµ·åããã° OK ã§ãã
ä»åº¦ãããtmux + rbenv ãåé¡ãªã使ããããã«ãªã£ãã¯ãã»ã»ã»ã