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

时间:2011-10-26 16:08:07

标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 capistrano

我正在使用Ruby on Rails 3.1.0和Capistrano gem。正如在“使用Capistrano自动部署”部分的Bundler official documentation中所写,我将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>

如何解决问题?

注意:这是我在this question之后开始遇到的相关问题的具体问题。

1 个答案:

答案 0 :(得分:0)

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