【发布时间】:2014-07-18 17:33:16
【问题描述】:
我正在使用 CentOS。这是我的输出:
# which rvm
/usr/local/rvm/bin/rvm
# rvm ruby-1.9.3-p392@gemset
# /usr/local/rvm/bin/rvm ruby-1.9.3-p392@gemset
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
如您所见,我是否只使用rvm 一切正常。但是capistrano 在这样的命令中使用完整路径
[46f28bd9] Command: cd /var/www/app/releases/20140718172057 && /usr/local/rvm/bin/rvm ruby-1.9.3-p392@gemset do bundle install --binstubs /var/www/app/shared/bin --path /var/www/app/shared/bundle --without development test --deployment --verbose
所以它只是失败了,所有的 gem 都安装在默认的 ruby 上,而不是 ruby-1.9.3-p392@gemset
感谢您的任何建议。
【问题讨论】:
-
也许可以试试
/usr/bin/env rvm? -
你在使用登录shell吗? rvm.io/integration/gnome-terminal
-
@NickVeys
/usr/bin/env rvm产生与rvm和/usr/local/rvm/bin/rvm相同的输出,但/usr/bin/env rvm ruby-1.9.3-p392给了我RVM is not a function。只有rvm ruby-1.9.3-p392按预期工作@nsave 是的,我是
标签: ruby-on-rails ruby rvm capistrano rvm-capistrano