无法从供应商缓存安装 Gems

发布于 2025-01-04 08:19:08 字数 535 浏览 3 评论 0原文

尽管 Capistrano 使用 --local 标志执行捆绑包安装,但供应商缓存中的 gem 并未安装到共享捆绑包路径中。相反,我收到通知:

您的供应商/缓存目录中似乎缺少一些 gem。

在任何源中都找不到 libv8-3.3.10.4

libv8-3.3.10.4 肯定位于供应商/缓存中。有谁知道为什么捆绑程序不会从缓存安装宝石?

Capistrano 执行的完整命令如下。

"cd /home/ari/apps/air/releases/20120209214139 && bundle install --gemfile /home/ari/apps/air/releases/20120209214139/Gemfile --path /home/ari/apps/air/shared/bundle --deployment --local --quiet --without development test"

In spite of the fact Capistrano executes bundle install with the flag --local gems from the vendor cache are NOT installed into the shared bundle path. Instead I'm notified that:

Some gems seem to be missing from your vendor/cache directory.

Could not find libv8-3.3.10.4 in any of the sources

libv8-3.3.10.4 is definitely located in the vendor/cache. Does anyone know why bundler won't install the gems from the cache?

The full command Capistrano executes is below.

"cd /home/ari/apps/air/releases/20120209214139 && bundle install --gemfile /home/ari/apps/air/releases/20120209214139/Gemfile --path /home/ari/apps/air/shared/bundle --deployment --local --quiet --without development test"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

带刺的爱情 2025-01-11 08:19:08

来自捆绑帮助安装

<前><代码>--本地
不要尝试连接到 ruby​​gems.org,而只是使用
gems 已经存在于 Rubygems 的缓存或供应商/缓存中。
请注意,如果存在更合适的特定于平台的 gem
rubygems.org,它将找不到。

注意:libv8 在首次安装时构建本机扩展。如果您为一个平台供应 gem 并尝试在另一平台上使用它,这可能会导致问题。

服务器上的 Rubygems 缓存中不存在 gem,或者部署中的 vendor/cache 中不存在 gem。因此,如果您在 vendor/cache 目录中看到该 gem,那么捆绑程序可能不知道在哪里查找您的 vendor/cache gem。

cd /home/ari/apps/air/releases/20120209214139 && 的输出是什么?捆绑列表?如果它没有显示在那里,但您可以在服务器上找到它,那么您就知道捆绑器不知道 vendor/cache gem 在哪里。

尝试通过您的登录名执行 gem env 并与通过 Capistrano 的 gem env 输出进行比较。查看 GEM PATHS 输出是否不同。

From bundle help install:

--local
          Do not attempt to connect to rubygems.org,  instead  using  just
          the  gems already present in Rubygems' cache or in vendor/cache.
          Note that if a more appropriate platform-specific gem exists  on
          rubygems.org, it will not be found.

Note: libv8 builds native extensions when it's first installed. This could cause problems if you vendor the gem for one platform and attempt to use it on another.

Either the gems are not present in the Rubygems cache on the server, or the gems are not present in vendor/cache in your deployment. So if you see the gem in your vendor/cache directory, then it could be that bundler doesn't know where to look for your vendor/cache gems.

What's the output of cd /home/ari/apps/air/releases/20120209214139 && bundle list? If it's not showing up there, but you can find it on the server, then you know that bundler doesn't know where the vendor/cache gems are.

Try doing a gem env via your login and compare against gem env output via Capistrano. See if the GEM PATHS output differs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文