0

我正在使用带有 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为什么即使我拥有它,它也会抱怨失踪?

4

1 回答 1

0

我通过将捆绑程序版本更新到 1.0.18 来解决这个问题。

我在这里得到了答案:Rails 3.1 上的 Capistrano 部署/资产失败

于 2012-07-28T19:50:14.467 回答