【问题标题】:Heroku, ZenTest and RubyGemsHeroku、ZenTest 和 RubyGems
【发布时间】:2011-08-20 08:27:44
【问题描述】:

这个问题有点像this one,但它的解决方案对我不起作用。使用 RVM,刚刚升级到 Rails 3.1 rc6。除了尝试部署到新的 heroku Cedar 暂存堆栈时,所有工作都出奇地顺利,我收到一个错误:

-----> 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 --system 和gem pristine --all。我已将所有测试 gem 放在我的 gemfile 中的 group(:development, :test, :cucumber) do 中,从跟踪中可以看出,我正在运行 bundle install 而不进行开发测试。它一定是我的 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

【问题讨论】:

    标签: ruby-on-rails heroku ruby-on-rails-3.1


    【解决方案1】:

    好吧,尽管日志说

    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
    

    这很有效,呸。无论如何,感谢您的回复。

    【讨论】:

    【解决方案2】:

    显然,this ZenTest change 不兼容。尝试通过添加/更改 Gemfile 来锁定 ZenTest 版本:

    gem "ZenTest", "4.6.0"
    

    在 Cedar 上非常适合我,而其他解决方案则不行。

    【讨论】:

    • 完美!这为我解决了这个问题。
    【解决方案3】:

    尝试改变:

    gem 'rake'
    

    进入

    gem 'rake', '~> 0.8.7'
    

    在您的 Gemfile 中。

    【讨论】:

    • 好吧,我认为这已经解决了,因为我现在收到一条完全不同的错误消息!非常感谢。参考的其他错误:fatal: Not a git repository: '.'
    • 请注意,我在运行 rake 任务时会收到此信息:no such file to load -- rake/dsl_definition
    • 哦,现在 rake 降级也不起作用:Installing rake (0.8.7) 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!
    • 最后在 rake 方面,我有依赖 rake 为 0.9.2 的依赖项。 childprocess-0.2.1 依赖于 [rake (~> 0.9.2)] launchy-2.0.5 依赖于 [rake (~> 0.9.2)] multi_json-1.0.3 依赖于 [rake (~> 0.9)]
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-16
    • 2014-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-03
    • 1970-01-01
    相关资源
    最近更新 更多