我想從OS X開發工作站部署Rails應用程序到RedHat Linux 5生產服務器。Capistrano Rails部署 - 「找不到寶石...回滾」
我把cap deploy
的全部輸出放入this gist。
,顯示了問題的輸出的這一部分,我想:
** [out :: [email protected]] Could not find gem 'awesome_print (>= 0) ruby' in any of the gem sources listed in your Gemfile.
** [out :: [email protected]] 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'
的「awesome_print」寶石集團的發展中列出但是當你部署督促打捆將忽略該開發組寶石 – kreek 2012-04-24 18:59:35
衛生署,我只是重讀你的問題,並注意到你的手筆! :)你是否嘗試過從Gemfile中取出該行的部署? (不理想,但只是爲了看看它是否有效) – kreek 2012-04-24 19:03:19
Bundler解決了所有組中的* everything *的依賴關係和版本。它可能不會安裝所有這些,但它至少必須找到gemspecs。無論您安裝什麼,這都可以保證開發==生產。不幸的是,我無法幫你解決缺失的寶石錯誤。 – dunedain289 2012-04-24 20:40:01