使用 Bundler 和 Capistrano 进行部署时出现问题
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您的本地 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.