我有以下 Capistrano 片段:
namespace :bundle do
task :install do
run "gem list && bundle -v"
end
end
当我跑
cap bundle:install
我得到以下输出:
** [out :: ....compute-1.amazonaws.com]
** [out :: ....compute-1.amazonaws.com] *** LOCAL GEMS ***
** [out :: ....compute-1.amazonaws.com]
** [out :: ....compute-1.amazonaws.com]
** [out :: ....compute-1.amazonaws.com] bundler (1.3.4)
** [out :: ....compute-1.amazonaws.com] rake (10.0.3)
** [out :: ....compute-1.amazonaws.com] rubygems-bundler (1.1.1)
** [out :: ....compute-1.amazonaws.com] rvm (1.11.3.6)
** [out :: ....compute-1.amazonaws.com]
** [out :: ....compute-1.amazonaws.com] ERROR: Gem bundler is not installed, run `gem install bundler` first.
gem 显示 bundler 已安装,但是当我尝试运行 bundle -v 时,我得到一个矛盾的错误,说它不是?我不明白为什么?
我尝试的另一件事是通过终端登录到服务器,当我在那里运行 bundle -v 时,它工作正常吗?
有什么想法有什么问题吗?