使用 Bundler 和 Capistrano 进行部署时出现问题

发布于 2024-12-12 02:26:02 字数 1429 浏览 0 评论 0原文

我正在使用 Ruby on Rails 3.1.0 和 Capistrano gem。正如“使用 Capistrano 自动部署”部分中的 Bundler 官方文档 中所写,我添加了 require 'bundler/capistrano' 到我的 deploy.rb 文件的顶部。

现在,当我运行 cap deploy:migrations 命令(部署并运行挂起的迁移)时,我收到以下错误:

...
* executing "cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test"
  servers: ["<my_remote_server_IP>"]
  [<my_remote_server_IP>] executing command
** [out :: <my_remote_server_IP>] Some gems seem to be missing from your vendor/cache directory.
** [out :: <my_remote_server_IP>] Could not find libv8-3.3.10.2 in any of the sources
   command finished in 2554ms
failed: "sh -c 'cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test'" on <my_remote_server_IP>

如何解决问题?

注意< /em>:这是我在 这个问题之后开始遇到的相关问题的具体问题

I am using Ruby on Rails 3.1.0 and the Capistrano gem. As wrote in the Bundler official documentation in the "Automatic deployment with Capistrano" section, I added the require 'bundler/capistrano' to the top of my deploy.rb file.

Now, when I run the cap deploy:migrations command (Deploy and run pending migrations) I get the following error:

...
* executing "cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test"
  servers: ["<my_remote_server_IP>"]
  [<my_remote_server_IP>] executing command
** [out :: <my_remote_server_IP>] Some gems seem to be missing from your vendor/cache directory.
** [out :: <my_remote_server_IP>] Could not find libv8-3.3.10.2 in any of the sources
   command finished in 2554ms
failed: "sh -c 'cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test'" on <my_remote_server_IP>

How can I solve the problem?

Note: This is a specific question of a related problem I started to have after this question.

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

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

发布评论

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

评论(1

感悟人生的甜 2024-12-19 02:26:02

听起来您的本地 Gemlock 文件可能与远程 Gemset 不同步。如果您最近添加了 gem,请确保在本地文件集上运行 bundle install 以更新 Gemlock 文件,然后签入这些更改(如果有)。重新运行部署。

Sounds like your local Gemlock file may be out of sync with your remote gemset. If you've recently added gems, make sure you run bundle install on your local fileset to update the Gemlock file, then check in those changes (if any). Re-run the deployment.

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