ruby-on-rails – 如何解决您的供应商/缓存目录中似乎缺少某些宝石.在任何来源中都找不到“无论什么”?

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 如何解决您的供应商/缓存目录中似乎缺少某些宝石.在任何来源中都找不到“无论什么”?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这真让我抓狂.我在Gemfile中添加了一个gem(hirb),现在我无法部署.

是的,我使用了bundle install –path vendor / cache

是的我使用了捆绑包

是的我提交了Gemfile和Gemfile.lock

删除了生产机器中的供应商/缓存文件夹,因此它会再次生成它而不是更新它.这是错的吗?

每当我运行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

解决方法

您可能想尝试删除–deployment标志.这似乎允许Bundler从供应商/缓存源和Rubygems安装.

Capfile:

set :bundle_flags,"--quiet --no-cache"

一个相关的错误https://github.com/bundler/bundler/issues/1454

猜你在找的Ruby相关文章