这让我发疯了。我在Gemfile中添加了一个gem(hirb),现在我无法部署。
是的,我使用了bundle install --path vendor/cache
是的,我使用了bundle package
是的,我提交了Gemfile和Gemfile.lock
我删除了生产计算机中的vendor / cache文件夹,因此它会再次生成它而不是更新它。这是错的吗?
每当我运行cap:deploy
时,我都会得到以下内容......
executing "cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
[11.111.11.11] env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test'
** [out :: 11.111.11.11] Some gems seem to be missing from your vendor/cache directory.
** [out :: 11.111.11.11] Could not find multi_json-1.3.6 in any of the sources
command finished in 48571ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/releases/20120606002321; true"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
[11.111.11.11] env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'rm -rf /var/www/releases/20120606002321; true'
command finished in 6417ms
failed: "env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test'" on 11.111.11.11
答案 0 :(得分:6)
您可能想尝试删除--deployment
标记。这似乎允许Bundler从vendor/cache
源和 Rubygems安装。
<强> Capfile:强>
set :bundle_flags, "--quiet --no-cache"
答案 1 :(得分:0)
@leonel,你可以检查几件事:
稍后你应该检查你是否有旧版本,然后尝试使用gem更新到multi_json的必需(或最新)版本。
希望有所帮助, [R
答案 2 :(得分:0)
尝试
bundle install --no-deployment
这会删除--deployment
“捆绑冻结”,阻止您尝试进行更新。您可以通过在.bundle/config
BUNDLE_FROZEN
来确认是否已冻结