2012-11-21 85 views
1

當我練習Ruby on Rails教程的第三章時。大多數靜態頁面之後:結論。我想我的應用程序推送到Heroku的,但一個錯誤出現了,如下:(我到處尋找這個錯誤,但不能得到解決)安裝ZenTest(4.8.2)時發生錯誤,並且Bundler無法繼續。

Counting objects: 96, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (73/73), done. 
Writing objects: 100% (79/79), 8.92 KiB, done. 
Total 79 (delta 35), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.2.1 
     Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment 
     Fetching gem metadata from https://rubygems.org/......... 
     Fetching gem metadata from https://rubygems.org/.. 
     Installing rake (0.8.7) 
     Installing ZenTest (4.8.2) 
     Gem::InstallError: ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself. 
     An error occurred while installing ZenTest (4.8.2), and Bundler cannot continue. 
     Make sure that `gem install ZenTest -v '4.8.2'` succeeds before bundling. 
! 
!  Failed to install gems via Bundler. 
! 
!  Heroku push rejected, failed to compile Ruby/rails app 

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

我的Gemfile是這樣的:

source 'https://rubygems.org' 

gem 'rails', '3.2.8' 

gem 'sqlite3', :group => [:development, :test] 

gem 'rb-fsevent', '~> 0.9.1' 
gem "ZenTest", "~> 4.8.2" 
gem 'rake', '~> 0.8.7' 

group :development, :test do 
    gem 'guard-spork', '1.2.0' 
    gem 'spork', '0.9.2' 
end 

group :production do 
    gem 'thin' 
    gem 'pg' 
end 

group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

group :development do 
    gem 'rspec-rails', '2.11.0' 
end 

group :text do 
    gem 'rspec', '2.11.0' 
    gem 'webrat', '0.7.2' 
end 

我不知道這個程序有什麼問題。我改變了Zentest版本,並投入測試或生產,它沒有工作。

回答

0

ZenTest似乎限制了允許的最新rubygems。解決方案是更新ZenTest,以及rubygems,因爲最新的ZenTest似乎效果更好。

相關問題