2011-08-20 46 views
4

這個問題有點像this one,但其解決方案不適合我。使用RVM,只需升級到Rails 3.1 rc6。所有的工作出奇順利,除了當我嘗試部署到新的Heroku雪松分期堆棧我得到一個錯誤:Heroku,ZenTest和RubyGems

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.1.pre.8 
     Running: bundle install --without development:test --path vendor/bundle --deployment 
     Fetching dependency information from the API at http://rubygems.org/...... 
     Fetching dependency information from the API at http://rubygems.org/. 
     Fetching git://github.com/paneq/calendar_date_select.git 
     Fetching git://github.com/moiristo/deep_cloneable.git 
     Fetching git://github.com/madebydna/nested_form.git 
     Fetching git://github.com/ernie/ransack.git 
     Installing rake (0.9.2) 
     Installing RedCloth (4.2.8) with native extensions 
     Installing ZenTest (4.6.1) Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! 
     /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:170:in `install': ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError) 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/source.rb:92:in `block in install' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/source.rb:82:in `install' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/installer.rb:64:in `block (2 levels) in run' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/rubygems_integration.rb:93:in `with_build_args' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/installer.rb:63:in `block in run' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/installer.rb:55:in `run' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/installer.rb:12:in `install' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/cli.rb:213:in `install' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/vendor/thor/task.rb:22:in `run' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/vendor/thor.rb:263:in `dispatch' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/vendor/thor/base.rb:386:in `start' 
     from /tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/bin/bundle:13:in `<top (required)>' 
     from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `load' 
     from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `<main>' 
! 
!  Failed to install gems via Bundler. 
! 
!  Heroku push rejected, failed to compile Ruby/rails app 

我已經運行gem update --syste米和gem pristine --all。我已將所有測試寶石放在group(:development, :test, :cucumber) do的gemfile文件中,正如您從跟蹤中看到的,我正在運行無需開發測試的軟件包安裝。它在我的Gemfile中一定是一個奇怪的依賴關係:任何東西都看不到你?

source 'http://rubygems.org' 

# Rails 
gem "rails", "3.1.0.rc6" 

# ORM 
gem 'sqlite3' 
gem "sqlite3-ruby", "~> 1.3.3" 

# Custom Gemsets 
gem 'calendar_date_select', :git => 'git://github.com/paneq/calendar_date_select.git', :branch => 'rails3test' 
gem 'client_side_validations', '3.0.5' 
gem 'cocoon' 
gem 'fastercsv', :platforms => :ruby_18 
gem 'formtastic', '~> 1.2.3' 
gem 'gravatar_image_tag', '1.0.0.pre2' 
gem 'haml' 
gem 'jquery-rails' 
gem 'nested_form', :git => 'git://github.com/madebydna/nested_form.git' 
gem 'nokogiri' 
gem 'paperclip', '~> 2.3' 
gem 'rails_helpers_fix' 
gem 'simple_form' 
gem 'simple-tooltip' 
gem 'will_paginate', '3.0.pre4' 
gem "carrierwave" 
gem "ransack", :git => "git://github.com/ernie/ransack.git" 
gem "activerecord-import", ">= 0.2.8" 
gem "csv_builder" 
gem 'pdfkit' 
gem 'wkhtmltopdf' 
gem "heroku" 
gem "rmagick" 
gem 'aws-s3' 
gem "cancan" 
gem "devise" 
gem 'deep_cloneable', :git => "git://github.com/moiristo/deep_cloneable.git" 
gem 'bundler' 
gem "activesupport" 
gem "unicorn" 

# Rails 3.1 - Asset Pipeline 
gem 'json' 
gem 'sass' 
gem 'coffee-script' 
gem 'uglifier' 


group(:development, :test, :cucumber) do 
    gem 'autotest' 
    gem 'autotest-rails' 
    gem 'cucumber' 
    gem 'cucumber-rails' 
    gem 'factory_girl' 
    gem 'factory_girl_rails' 
    gem 'faker' 
    gem 'launchy' 
    gem 'rspec' 
    gem 'rspec-core',   :require => 'rspec/core' 
    gem 'rspec-expectations', :require => 'rspec/expectations' 
    gem 'rspec-mocks',  :require => 'rspec/mocks' 
    gem 'rspec-rails' 
    gem 'spork', '>= 0.9.0.rc' 
    gem 'webrat' 
    gem 'ZenTest' 

end 

回答

4

歐凱doke,即使日誌說

Running: bundle install --without development:test --path vendor/bundle --deployment 

事實並非如此。正在運行

$ heroku config:add BUNDLE_WITHOUT="development:test" --app appname 

已經把我排序了。我還做了

git rm Gemfile.lock 

和捆綁安裝,並承諾之前

git push staging master 

其工作,表示不快。無論如何,感謝您的迴應。

+1

這在Cedar堆棧中不起作用,因爲Heroku在Cedar Stack中不支持BUNDLE_WITHOUT。你可以找到更多信息(http://devcenter.heroku.com/articles/bundler)。 – membLoper

+0

完美地在竹堆中運作 – dbslone

0

嘗試改變:

gem 'rake' 

gem 'rake', '~> 0.8.7' 
在你的Gemfile

+0

嗯,我認爲這是固定的,因爲我現在得到一個完全不同的錯誤消息!非常感謝。爲參考其他錯誤: '致命的:不是git倉庫:」 .'' – snowangel

+0

你要知道,我得到這個當我運行rake任務: '沒有這樣的文件加載 - 耙/ dsl_definition' – snowangel

+0

呵呵,現在的耙降級不工作之一: '安裝耙(0.8.7)' '與本地extensions'安裝RedCloth(4.2.8) '安裝ZenTest(4.6.1)不幸的是,發生了致命的錯誤。請通過https://github.com/carlhuda/bundler/issues向Bundler問題跟蹤器報告此錯誤,以便我們解決它。謝謝!' – snowangel

4

顯然,this ZenTest change是不兼容的。嘗試通過添加/在你Gemfile改變鎖定ZenTest版本:

gem "ZenTest", "4.6.0" 

在雪松對我的作品很大,而其他解決方案沒有。

+0

完美!這爲我解決了這個問題。 –