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

时间:2012-04-24 18:43:36

标签: ruby-on-rails deployment capistrano bundler

我正在尝试将OS X开发工作站上的Rails应用程序部署到RedHat Linux 5生产服务器。

我将cap deploy的完整输出放入 this gist

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

 ** [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

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

  • 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'

1 个答案:

答案 0 :(得分:7)

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