0

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

我把完整的输出cap deploy放到这个 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 不应该尝试在生产中安装它。

  • 无论如何,所有的 gem 都可以在 ruby​​gems.org 中找到,所以安装它们应该没有问题。

如果有人知道cap deploy上班的方法,我将不胜感激。谢谢。


我的宝石文件...

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

1 回答 1

7

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

于 2012-04-24T21:05:37.547 回答