1

当我练习 Ruby on Rails 教程的第三章时。在大多是静态页面之后:结论。我试图将我的应用程序推送到heroku,但出现如下错误:(我到处搜索此错误但无法找到解决方案)

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 git@heroku.com:stark-tundra-9366.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com: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 版本并投入测试或生产,它没有工作。

4

1 回答 1

0

ZenTest 似乎限制了允许的最新 ruby​​gems。它的解决方案是更新 ZenTest 以及 ruby​​gems,因为最新的 ZenTest 似乎工作得更好。

于 2013-10-08T14:00:53.563 回答