我正在使用带有 Rails 3.2.1 的 Capistrano。当我这样做时cap deploy
,我收到此错误:
Could not find multi_json-1.3.6 in any of the sources
以下是导致此错误的一些相关输出:
* executing `deploy:assets:precompile'
* executing "cd /home/jason/dittypad-cap/releases/20120728190221 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["sniphq.com"]
[sniphq.com] executing command
** [out :: sniphq.com] Could not find multi_json-1.3.6 in any of the sources
不过,我确实有这个宝石:
$ bundle list | grep multi_json
* multi_json (1.3.6)
我很想知道如果我assets:precompile
直接在生产环境中运行会发生什么。我第一次尝试它,它工作。但是现在当我尝试它时,我得到了这个:
$ bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
/home/jason/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /home/jason/dittypad-cap/shared/bundle/ruby/1.9.1/bin/rake:18:in `<main>'
multi_json
为什么即使我拥有它,它也会抱怨失踪?