Trouble on deploying with Bundler and Capistrano

放肆的年华 提交于 2019-12-11 05:28:52

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/7905519/trouble-on-deploying-with-bundler-and-capistrano

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!