2013-08-26 173 views
0

當運行rvmsudo創業板安裝Capistrano的

rvmsudo gem install capistrano 

我得到這樣的警告:

Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run: 

    export rvmsudo_secure_path=1 

to avoid the warning, put it in shell initialization file to make it persistent. 

In case there is no `secure_path` in `/etc/sudoers`. Run: 

    export rvmsudo_secure_path=0 

to avoid the warning, put it in shell initialization file to make it persistent. 

我在Mac OS X和我有在/etc/sudoers沒有secure_path所以我想我需要放:

export rvmsudo_secure_path=0 

在我.bash_profile,對不對?

回答

0

是的,基於RVM警告,您的.bash_profile是放置該出口行的正確位置。

除了這個問題,但是,使用rvmsudo是必要的嗎?如果您使用的是RVM,則應該能夠不使用sudo安裝gem(因爲它們正在安裝到您的主目錄或用戶可寫的系統目錄中)。

+0

如果您進行系統範圍的安裝,這是phusion乘客似乎推薦用於生產環境的,它們並未安裝在主目錄中。 – JohnMerlino

+1

那麼你在生產中使用Mac OS X嗎? – lmars