Heroku,ZenTest和RubyGems [英] Heroku, ZenTest and RubyGems

查看:117
本文介绍了Heroku,ZenTest和RubyGems的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题有点像这一个但它的解决方案不适合我。使用RVM,只需升级到Rails 3.1 rc6。除非当我试图部署到新的Heroku Cedar分级堆栈时,所有的工作都非常顺利,我得到一个错误:

  ---- - > Heroku接收推送
-----> Ruby / Rails应用程序检测到
----->使用Bundler版本1.1.pre.8安装依赖关系
正在运行:bundle install --without development:test --path vendor / bundle --deployment
从http:// ruby​​gems的API获取依赖关系信息。 org / ......
从http://rubygems.org/获取来自API的依赖信息。
获取git://github.com/paneq/calendar_date_select.git
获取git://github.com/moiristo/deep_cloneable.git
获取git://github.com/madebydna /nested_form.git
获取git://github.com/ernie/ransack.git
安装rake(0.9.2)
使用原生扩展安装RedCloth(4.2.8)
安装ZenTest(4.6.1)不幸的是,发生了一个致命的错误。请通过https://github.com/carlhuda/bundler/issues向Bundler问题跟踪器报告此错误,以便我们解决它。谢谢!
/usr/local/lib/ruby/1.9.1/rubygems/installer.rb:170:in`install':ZenTest需要RubyGems version〜> 1.8。试试'gem update --system'来更新RubyGems本身。 (Gem :: InstallError)$ / b / b / bmp / build /从/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:在'block(2 levels)in run'
from / tmp / build_1g1g96ub4uas6 / vendor / bundle / ruby​​ / 1.9.1 / gems / bundler-1.1.pre.8 / lib / bundler / ruby​​gems_integration.rb:93:在`with_build_args'
从/ tmp / build_1g1g96ub4uas6 / vendor / bundle / ruby​​ / 1.9.1 / gems / bundler-1.1.pre.8 / lib / bundler / installer.rb:63:在`block in run'中
来自/tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/宝石/捆绑-1.1.pre.8 / LIB /捆绑/ installer.rb:55:在从/tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.pre.8/lib/bundler/installer.rb:12:in`install'$ b $运行
b 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:在`run'中运行
/ 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 /rub/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9 .1 / gems / bundler-1.1.pre.8 / lib / bundler / vendor / thor / base.rb:386:在'start'中
来自/tmp/build_1g1g96ub4uas6/vendor/bundle/ruby/1.9.1 /gems/bundler-1.1.pre.8/bin/bundle:13:in`< top(required)>'
from vendor / bundle / rub y / 1.9.1 / bin / bundle:19:`load'
来自vendor / bundle / ruby​​ / 1.9.1 / bin / bundle:19:在`< main>'

!无法通过Bundler安装宝石。

! Heroku推送被拒绝,未能编译Ruby / rails应用程序

我运行了 gem update --syste m和 gem pristine --all 。我已经将所有测试项目放在 group(:development,:test,:cucumber)中,在我的gemfile中做,正如您从我正在运行的跟踪中看到的那样没有开发测试安装。它在我的Gemfile中一定是一个奇怪的依赖关系:任何东西都看不到你?

 源'http://rubygems.org'

#Rails
gem rails,3.1.0.rc6

#ORM
gem'sqlite3'
gemsqlite3-ruby,〜> 1.3.3

#自定义宝石
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'
gemcarrierwave
gemransack,::git => git://github.com/ernie/ransack.git
gemactiverecord-import,> = 0.2.8
gemcsv_builder
gem'pdfkit'
gem'wkhtmltopdf'
gemheroku
gemrmagick
gem'aws-s3'
gemcancan
gemdevise
gem'deep_cloneable',:git => git://github.com/moiristo/deep_cloneable.git
gem'bundler'
gemactivesupport
gem独角兽

#Rails 3.1 - 资产管道
gem'json'
gem'sass'
gem'咖啡剧本'
gem'uglifier'


组(: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


解决方案

,即使日志说

 运行:bundle install --without开发:test --path vendor / bundle --deployment 

不是。运行

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

把我排序出来。我也做了

  git rm Gemfile.lock 

和bundle之前的安装和提交

  git push staging master 

哪些工作,phew。无论如何,感谢您的回应。

This question is a bit like this one but its solutions don't work for me. Using RVM, just upgraded to Rails 3.1 rc6. All working surprisingly smoothly except when I attempt to deploy to a new heroku Cedar staging stack I get an error:

-----> 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

I've run gem update --system, and gem pristine --all. I've put all the test gems in group(:development, :test, :cucumber) do in my gemfile and as you can see from the trace I'm running bundle install without development test. It must be a weird dependency in my Gemfile which is here: anything look off to you?

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

解决方案

Okey doke, even though the logs said

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

it wasn't. Running

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

Sorted me out. I also did

git rm Gemfile.lock

and bundle install and commit before

git push staging master

which worked, phew. Thanks for your responses, anyway.

这篇关于Heroku,ZenTest和RubyGems的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆