我正在尝试运行Capistrano,它无法在我的服务器上运行rake。当我尝试运行cap deploy
时,我收到以下错误:
*** [err :: ] /usr/lib/ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rake (>= 0) (Gem::LoadError)
*** [err :: ] from /usr/lib/ruby/1.8/rubygems.rb:214:in `activate'
*** [err :: ] from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem'
*** [err :: ] from /usr/lib/ruby/gems/1.8/bin/rake:18
在我的部署文件中,我添加了set :rake, '/home/.gems/bin/rake'
(这是我的rake的正确路径),以确保我正在运行正确的rake。
当我通过SSH登录我的服务器时,我可以正常运行rake
答案 0 :(得分:0)
也许你必须致电
bundle exec rake ....
# Updated post
set :default_environment, {
'PATH' => "..../usr/local/rbenv/shims:/usr/local/rbenv/bin:$PATH"
}