Capistrano Rails部署 - "找不到宝石......回滚"

Eth*_*han 0 deployment capistrano ruby-on-rails bundler

我正在尝试从OS X开发工作站向RedHat Linux 5生产服务器部署Rails应用程序.

我把完整的输出cap deploy放到了这个要点中.

我认为这部分输出显示了问题:

 ** [out :: devuser@web3] Could not find gem 'awesome_print (>= 0) ruby' in any of the gem sources listed in your Gemfile.
 ** [out :: devuser@web3] Run `bundle install` to install missing gems.
    command finished in 663ms
*** [deploy:update_code] rolling back
Run Code Online (Sandbox Code Playgroud)

这些是我在这里看到的一些问题:

  • awesome_print:development集团中,因此Capistrano不应该尝试在生产中安装它.

  • 无论如何,所有的宝石都可以在rubygems.org中找到,所以安装它们应该没有问题.

如果有人知道cap deploy上班的方式,我将很高兴知道它.谢谢.


我的Gemfile ......

source 'https://rubygems.org'

gem 'rails', '3.2.2'
gem 'mysql2', '0.3.11'
gem 'capistrano', '2.11.2'
gem 'haml-rails', '0.3.4'
gem 'net-ldap', '0.3.1'
gem 'bourbon', '1.4.0'
gem 'simple_form', '2.0.1'
gem 'will_paginate', '3.0.3'

group :development, :test do
end

group :development do
  gem 'wirble'
  gem 'awesome_print'
  gem "autotest", '4.4.6'
  gem "autotest-rails-pure", '4.1.2'
  gem "autotest-fsevent", '0.2.8'
  gem "autotest-growl", '0.2.16'
end

group :test do
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyracer', '0.9.10'

  gem 'uglifier', '>= 1.0.3'
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
Run Code Online (Sandbox Code Playgroud)

小智 7

我认为你的capistrano配方实际上并没有完全运行bundle install.确保你require "bundler/capistrano"的deploy.rb配方.