2011-11-05 136 views
0

升級我的Rails 3.0.9應用3.1.1後推到Heroku上雪松堆棧的時候,我發現了以下捆綁錯誤:的Rails 3.1.1部署到Heroku的失敗

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.1.rc 
     Running: bundle install --without development:test --path vendor/bundle 
     Updating git://github.com/sferik/rails_admin.git 
     Fetching gem metadata from http://rubygems.org/........ 
     Bundler could not find compatible versions for gem "rails": 
     In Gemfile: 
     rails_admin (>= 0) ruby depends on 
     rails (~> 3.1) ruby 
     rails (3.0.9) 

! 
!  Failed to install gems via Bundler. 
! 
!  Heroku push rejected, failed to compile Ruby/rails app 

To [email protected]:[app].git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:[app].git' 

我本來使用Bundler 1.0.21,但注意到Heroku使用1.1.rc,所以我從gemset中移除了1.0.21,安裝了1.1.rc,並重新生成了我的gemfile.lock。

我試過刪除gemfile.lock並使用捆綁包更新/捆綁包安裝重新生成它,並嘗試從gemfile中刪除rails_admin gem。我也嘗試徹底清空我的寶石,並重新安裝所有的寶石。

我的Gemfile看起來像:

source 'http://rubygems.org' 

gem 'rails', '>= 3.1.1' 
gem 'pg' 
group :assets do 
    gem 'sass-rails', "~>3.1.4" 
    gem 'coffee-rails', "~>3.1.0" 
    gem 'uglifier' 
end 

gem 'devise' 
gem 'cancan' 
gem 'rake', '>= 0.9.2.2' 
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git' 
gem 'jquery-rails', '>= 1.0.12' 
# haml added to make heroku-cedar happy 
gem 'haml' 
gem 'formtastic', '>= 1.2.3' 
gem 'tabs_on_rails' 
gem 'acts_as_list' 
gem 'acts-as-taggable-on' 
gem 'best_in_place' 
# fastercsv added to make heroku-cedar happy 
gem 'fastercsv' 
gem 'event-calendar', :require => 'event_calendar' 
gem 'date_validator' 
gem 'nested_form', :git => 'git://github.com/ryanb/nested_form.git' 
gem 'will_paginate', '>= 3.0.pre4' 
gem 'heroku' 



# Google analytics gem 
group :production do 
    gem 'thin' 
    gem 'rack-google_analytics', :require => "rack/google_analytics" 
end 

# Bundle the extra gems: 
# gem 'bj' 
# gem 'nokogiri' 
# gem 'aws-s3', :require => 'aws/s3' 

# Bundle gems for the local environment. Make sure to 
# put test-only gems in this group so their generators 
# and rake tasks are available in development mode: 

gem "rspec-rails", ">= 2.6.1", :group => [:test, :development] 

group :test do 
     gem 'factory_girl_rails' 
     gem 'webrat' 
     gem 'guard-rspec' 
end 

和Gemfile.lock的:

GIT 
    remote: git://github.com/ryanb/nested_form.git 
    revision: 57f32788f1952bcd633057b4b56b69b51df17610 
    specs: 
    nested_form (0.1.1) 

GIT 
    remote: git://github.com/sferik/rails_admin.git 
    revision: e99d7f8e9002ae7c6b4dddb962174e76f8663400 
    specs: 
    rails_admin (0.0.1) 
     bootstrap-sass (~> 1.4) 
     builder (~> 3.0) 
     coffee-rails (~> 3.1) 
     haml (~> 3.1) 
     jquery-rails (= 1.0.16) 
     kaminari (~> 0.12.4) 
     rails (~> 3.1) 
     remotipart (= 1.0) 

GEM 
    remote: http://rubygems.org/ 
    specs: 
    actionmailer (3.1.1) 
     actionpack (= 3.1.1) 
     mail (~> 2.3.0) 
    actionpack (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
     builder (~> 3.0.0) 
     erubis (~> 2.7.0) 
     i18n (~> 0.6) 
     rack (~> 1.3.2) 
     rack-cache (~> 1.1) 
     rack-mount (~> 0.8.2) 
     rack-test (~> 0.6.1) 
     sprockets (~> 2.0.2) 
    activemodel (3.1.1) 
     activesupport (= 3.1.1) 
     builder (~> 3.0.0) 
     i18n (~> 0.6) 
    activerecord (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
     arel (~> 2.2.1) 
     tzinfo (~> 0.3.29) 
    activeresource (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
    activesupport (3.1.1) 
     multi_json (~> 1.0) 
    acts-as-taggable-on (2.1.1) 
     rails 
    acts_as_list (0.1.4) 
    addressable (2.2.6) 
    arel (2.2.1) 
    bcrypt-ruby (3.0.1) 
    best_in_place (1.0.1) 
     jquery-rails 
     rails (~> 3.1.0) 
    bootstrap-sass (1.4.0) 
     sass-rails (~> 3.1.0) 
    builder (3.0.0) 
    cancan (1.6.7) 
    coffee-rails (3.1.1) 
     coffee-script (>= 2.2.0) 
     railties (~> 3.1.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.1.2) 
    daemons (1.1.4) 
    date_validator (0.6.2) 
     activemodel (>= 3.0.0, < 3.2.0) 
    devise (1.4.9) 
     bcrypt-ruby (~> 3.0) 
     orm_adapter (~> 0.0.3) 
     warden (~> 1.0.3) 
    diff-lcs (1.1.3) 
    erubis (2.7.0) 
    event-calendar (2.3.3) 
    eventmachine (0.12.10) 
    execjs (1.2.9) 
     multi_json (~> 1.0) 
    factory_girl (2.2.0) 
     activesupport 
    factory_girl_rails (1.3.0) 
     factory_girl (~> 2.2.0) 
     railties (>= 3.0.0) 
    fastercsv (1.5.4) 
    formtastic (2.0.2) 
     rails (~> 3.0) 
    guard (0.8.8) 
     thor (~> 0.14.6) 
    guard-rspec (0.5.2) 
     guard (>= 0.8.4) 
    haml (3.1.3) 
    heroku (2.11.1) 
     launchy (>= 0.3.2) 
     rest-client (~> 1.6.1) 
     rubyzip 
     term-ansicolor (~> 1.0.5) 
    hike (1.2.1) 
    i18n (0.6.0) 
    jquery-rails (1.0.16) 
     railties (~> 3.0) 
     thor (~> 0.14) 
    json (1.6.1) 
    kaminari (0.12.4) 
     rails (>= 3.0.0) 
    launchy (2.0.5) 
     addressable (~> 2.2.6) 
    mail (2.3.0) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.17.2) 
    multi_json (1.0.3) 
    nokogiri (1.5.0) 
    orm_adapter (0.0.5) 
    pg (0.11.0) 
    polyglot (0.3.3) 
    rack (1.3.5) 
    rack-cache (1.1) 
     rack (>= 0.4) 
    rack-google_analytics (1.0.2) 
     rack 
    rack-mount (0.8.3) 
     rack (>= 1.0.0) 
    rack-ssl (1.3.2) 
     rack 
    rack-test (0.6.1) 
     rack (>= 1.0) 
    rails (3.1.1) 
     actionmailer (= 3.1.1) 
     actionpack (= 3.1.1) 
     activerecord (= 3.1.1) 
     activeresource (= 3.1.1) 
     activesupport (= 3.1.1) 
     bundler (~> 1.0) 
     railties (= 3.1.1) 
    railties (3.1.1) 
     actionpack (= 3.1.1) 
     activesupport (= 3.1.1) 
     rack-ssl (~> 1.3.2) 
     rake (>= 0.8.7) 
     rdoc (~> 3.4) 
     thor (~> 0.14.6) 
    rake (0.9.2.2) 
    rdoc (3.11) 
     json (~> 1.4) 
    remotipart (1.0) 
    rest-client (1.6.7) 
     mime-types (>= 1.16) 
    rspec (2.7.0) 
     rspec-core (~> 2.7.0) 
     rspec-expectations (~> 2.7.0) 
     rspec-mocks (~> 2.7.0) 
    rspec-core (2.7.1) 
    rspec-expectations (2.7.0) 
     diff-lcs (~> 1.1.2) 
    rspec-mocks (2.7.0) 
    rspec-rails (2.7.0) 
     actionpack (~> 3.0) 
     activesupport (~> 3.0) 
     railties (~> 3.0) 
     rspec (~> 2.7.0) 
    rubyzip (0.9.4) 
    sass (3.1.10) 
    sass-rails (3.1.4) 
     actionpack (~> 3.1.0) 
     railties (~> 3.1.0) 
     sass (>= 3.1.4) 
     sprockets (~> 2.0.0) 
     tilt (~> 1.3.2) 
    sprockets (2.0.3) 
     hike (~> 1.2) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    tabs_on_rails (2.0.2) 
    term-ansicolor (1.0.7) 
    thin (1.2.11) 
     daemons (>= 1.0.9) 
     eventmachine (>= 0.12.6) 
     rack (>= 1.0.0) 
    thor (0.14.6) 
    tilt (1.3.3) 
    treetop (1.4.10) 
     polyglot 
     polyglot (>= 0.3.1) 
    tzinfo (0.3.30) 
    uglifier (1.0.4) 
     execjs (>= 0.3.0) 
     multi_json (>= 1.0.2) 
    warden (1.0.6) 
     rack (>= 1.0) 
    webrat (0.7.3) 
     nokogiri (>= 1.2.0) 
     rack (>= 1.0) 
     rack-test (>= 0.5.3) 
    will_paginate (3.0.2) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    acts-as-taggable-on 
    acts_as_list 
    best_in_place 
    cancan 
    coffee-rails (~> 3.1.0) 
    date_validator 
    devise 
    event-calendar 
    factory_girl_rails 
    fastercsv 
    formtastic (>= 1.2.3) 
    guard-rspec 
    haml 
    heroku 
    jquery-rails (>= 1.0.12) 
    nested_form! 
    pg 
    rack-google_analytics 
    rails (>= 3.1.1) 
    rails_admin! 
    rake (>= 0.9.2.2) 
    rspec-rails (>= 2.6.1) 
    sass-rails (~> 3.1.4) 
    tabs_on_rails 
    thin 
    uglifier 
    webrat 
    will_paginate (>= 3.0.pre4) 

註釋掉rails_admin和捆綁更新/包安裝後Gemfile.lock的:

GIT 
    remote: git://github.com/ryanb/nested_form.git 
    revision: 57f32788f1952bcd633057b4b56b69b51df17610 
    specs: 
    nested_form (0.1.1) 

GEM 
    remote: http://rubygems.org/ 
    specs: 
    actionmailer (3.1.1) 
     actionpack (= 3.1.1) 
     mail (~> 2.3.0) 
    actionpack (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
     builder (~> 3.0.0) 
     erubis (~> 2.7.0) 
     i18n (~> 0.6) 
     rack (~> 1.3.2) 
     rack-cache (~> 1.1) 
     rack-mount (~> 0.8.2) 
     rack-test (~> 0.6.1) 
     sprockets (~> 2.0.2) 
    activemodel (3.1.1) 
     activesupport (= 3.1.1) 
     builder (~> 3.0.0) 
     i18n (~> 0.6) 
    activerecord (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
     arel (~> 2.2.1) 
     tzinfo (~> 0.3.29) 
    activeresource (3.1.1) 
     activemodel (= 3.1.1) 
     activesupport (= 3.1.1) 
    activesupport (3.1.1) 
     multi_json (~> 1.0) 
    acts-as-taggable-on (2.1.1) 
     rails 
    acts_as_list (0.1.4) 
    addressable (2.2.6) 
    arel (2.2.1) 
    bcrypt-ruby (3.0.1) 
    best_in_place (1.0.1) 
     jquery-rails 
     rails (~> 3.1.0) 
    builder (3.0.0) 
    cancan (1.6.7) 
    coffee-rails (3.1.1) 
     coffee-script (>= 2.2.0) 
     railties (~> 3.1.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.1.2) 
    daemons (1.1.4) 
    date_validator (0.6.2) 
     activemodel (>= 3.0.0, < 3.2.0) 
    devise (1.4.9) 
     bcrypt-ruby (~> 3.0) 
     orm_adapter (~> 0.0.3) 
     warden (~> 1.0.3) 
    diff-lcs (1.1.3) 
    erubis (2.7.0) 
    event-calendar (2.3.3) 
    eventmachine (0.12.10) 
    execjs (1.2.9) 
     multi_json (~> 1.0) 
    factory_girl (2.2.0) 
     activesupport 
    factory_girl_rails (1.3.0) 
     factory_girl (~> 2.2.0) 
     railties (>= 3.0.0) 
    fastercsv (1.5.4) 
    formtastic (2.0.2) 
     rails (~> 3.0) 
    guard (0.8.8) 
     thor (~> 0.14.6) 
    guard-rspec (0.5.2) 
     guard (>= 0.8.4) 
    haml (3.1.3) 
    heroku (2.11.1) 
     launchy (>= 0.3.2) 
     rest-client (~> 1.6.1) 
     rubyzip 
     term-ansicolor (~> 1.0.5) 
    hike (1.2.1) 
    i18n (0.6.0) 
    jquery-rails (1.0.16) 
     railties (~> 3.0) 
     thor (~> 0.14) 
    json (1.6.1) 
    launchy (2.0.5) 
     addressable (~> 2.2.6) 
    mail (2.3.0) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.17.2) 
    multi_json (1.0.3) 
    nokogiri (1.5.0) 
    orm_adapter (0.0.5) 
    pg (0.11.0) 
    polyglot (0.3.3) 
    rack (1.3.5) 
    rack-cache (1.1) 
     rack (>= 0.4) 
    rack-google_analytics (1.0.2) 
     rack 
    rack-mount (0.8.3) 
     rack (>= 1.0.0) 
    rack-ssl (1.3.2) 
     rack 
    rack-test (0.6.1) 
     rack (>= 1.0) 
    rails (3.1.1) 
     actionmailer (= 3.1.1) 
     actionpack (= 3.1.1) 
     activerecord (= 3.1.1) 
     activeresource (= 3.1.1) 
     activesupport (= 3.1.1) 
     bundler (~> 1.0) 
     railties (= 3.1.1) 
    railties (3.1.1) 
     actionpack (= 3.1.1) 
     activesupport (= 3.1.1) 
     rack-ssl (~> 1.3.2) 
     rake (>= 0.8.7) 
     rdoc (~> 3.4) 
     thor (~> 0.14.6) 
    rake (0.9.2.2) 
    rdoc (3.11) 
     json (~> 1.4) 
    rest-client (1.6.7) 
     mime-types (>= 1.16) 
    rspec (2.7.0) 
     rspec-core (~> 2.7.0) 
     rspec-expectations (~> 2.7.0) 
     rspec-mocks (~> 2.7.0) 
    rspec-core (2.7.1) 
    rspec-expectations (2.7.0) 
     diff-lcs (~> 1.1.2) 
    rspec-mocks (2.7.0) 
    rspec-rails (2.7.0) 
     actionpack (~> 3.0) 
     activesupport (~> 3.0) 
     railties (~> 3.0) 
     rspec (~> 2.7.0) 
    rubyzip (0.9.4) 
    sass (3.1.10) 
    sass-rails (3.1.4) 
     actionpack (~> 3.1.0) 
     railties (~> 3.1.0) 
     sass (>= 3.1.4) 
     sprockets (~> 2.0.0) 
     tilt (~> 1.3.2) 
    sprockets (2.0.3) 
     hike (~> 1.2) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    tabs_on_rails (2.0.2) 
    term-ansicolor (1.0.7) 
    thin (1.2.11) 
     daemons (>= 1.0.9) 
     eventmachine (>= 0.12.6) 
     rack (>= 1.0.0) 
    thor (0.14.6) 
    tilt (1.3.3) 
    treetop (1.4.10) 
     polyglot 
     polyglot (>= 0.3.1) 
    tzinfo (0.3.30) 
    uglifier (1.0.4) 
     execjs (>= 0.3.0) 
     multi_json (>= 1.0.2) 
    warden (1.0.6) 
     rack (>= 1.0) 
    webrat (0.7.3) 
     nokogiri (>= 1.2.0) 
     rack (>= 1.0) 
     rack-test (>= 0.5.3) 
    will_paginate (3.0.2) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    acts-as-taggable-on 
    acts_as_list 
    best_in_place 
    cancan 
    coffee-rails (~> 3.1.0) 
    date_validator 
    devise 
    event-calendar 
    factory_girl_rails 
    fastercsv 
    formtastic (>= 1.2.3) 
    guard-rspec 
    haml 
    heroku 
    jquery-rails (>= 1.0.12) 
    nested_form! 
    pg 
    rack-google_analytics 
    rails (>= 3.1.1) 
    rake (>= 0.9.2.2) 
    rspec-rails (>= 2.6.1) 
    sass-rails (~> 3.1.4) 
    tabs_on_rails 
    thin 
    uglifier 
    webrat 
    will_paginate (>= 3.0.pre4) 
+0

當你完全刪除'rails_admin'時,它是否仍然給你'rails_admin(> = 0)ruby取決於'的東西? –

+0

是的,它的確如此。不知道爲什麼 - 在我註釋掉rails_admin並運行bundle安裝後,我完全刪除了gemfile.lock。 – MattH

+0

@ hardy12 Gemfile.lock捆綁更新/捆綁安裝後與rails_admin註釋掉: 代碼 – MattH

回答

0

在最後我通過刪除我的.git目錄解決了這個問題,使用git init初始化了一個新的repo並重新提交d一切。不理想,但我能解決這個問題的唯一方法。