Ruby 无法通过bundler安装gems,heroku推送被拒绝
我尝试过更新捆绑程序并安装它,但仍然失败。我已经通读了我能找到的关于这个话题的所有东西,但它并没有解决问题 档案:Ruby 无法通过bundler安装gems,heroku推送被拒绝,ruby,heroku,rubygems,sinatra,bundler,Ruby,Heroku,Rubygems,Sinatra,Bundler,我尝试过更新捆绑程序并安装它,但仍然失败。我已经通读了我能找到的关于这个话题的所有东西,但它并没有解决问题 档案: source 'http://isitup.org/rubygems.org' gem 'sinatra', '1.3.3' gem 'thin' gem 'warden' gem 'bcrypt-ruby' group :production do gem 'pg' end group :development, :test do gem 'sqlite3' end
source 'http://isitup.org/rubygems.org'
gem 'sinatra', '1.3.3'
gem 'thin'
gem 'warden'
gem 'bcrypt-ruby'
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end
这就是我运行git push heroku master时发生的情况
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.11 KiB, done.
Total 11 (delta 7), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Installing dependencies using Bundler version 1.2.1
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* warden
* bcrypt-ruby
* pg
* sqlite3
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rack app
To git@heroku.com:aqueous-wildwood-3092.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:aqueous-wildwood-3092.git'
谢谢
编辑:
使用捆绑安装时出错
Fetching gem metadata from http://isitup.org/rubygems.org/.
Error TypeError during request to dependency API
Fetching full source index from http://isitup.org/rubygems.org/
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/lib/ruby/1.9.1/rubygems.rb:540:in `initialize': not in gzip format (Zlib::GzipFile::Error)
from /usr/lib/ruby/1.9.1/rubygems.rb:540:in `new'
from /usr/lib/ruby/1.9.1/rubygems.rb:540:in `gunzip'
from /usr/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:239:in `fetch_path'
from /usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:265:in `load_specs'
from /usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:231:in `block in list'
from /usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `each'
from /usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `list'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:216:in `fetch_all_remote_specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:89:in `rescue in specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:72:in `specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from /var/lib/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
from /usr/local/bin/bundle:19:in `load'
from /usr/local/bin/bundle:19:in `<main>'
从中获取gem元数据http://isitup.org/rubygems.org/.
错误类型请求依赖项API时出错
从中获取完整的源索引http://isitup.org/rubygems.org/
不幸的是,发生了一个致命错误。请看打包机
故障排除文档位于http://bit.ly/bundler-issues. 谢谢
/usr/lib/ruby/1.9.1/rubygems.rb:540:在“初始化”中:不是gzip格式(Zlib::GzipFile::Error)
from/usr/lib/ruby/1.9.1/rubygems.rb:540:in'new'
from/usr/lib/ruby/1.9.1/rubygems.rb:540:in'gunzip'
from/usr/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:239:in'fetch_path'
from/usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:265:in'load_specs'
from/usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:231:in'block in list'
from/usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in'each'
from/usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in'list'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:216:'fetch_all_remote_specs'中的
摘自/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:89:“规范中的救援”
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/fetcher.rb:72:in'specs'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:234:in‘block in remote_specs’
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:232:in'each'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:232:在“远程规范”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:165:in'fetch_specs'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/source.rb:70:in'specs'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:191:在“索引中的块(2个级别)”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in'each'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:188:“索引中的块”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/index.rb:9:in'build'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in'index'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in'resolve'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in'specs'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:108:“远程解析!”
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/installer.rb:81:在“运行”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in'install'
从/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/cli.rb:230:“安装”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:在“运行”中
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:“invoke_task”中的
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in“dispatch”
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in'start'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in'block-in'
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in“with_-friendly_errors”
from/var/lib/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in`'
from/usr/local/bin/bundle:19:in'load'
from/usr/local/bin/bundle:19:in`'
在推送之前,您是否尝试过进行捆绑安装?您的Gemfile.lock没有使用您对Gemfile所做的最新更改进行更新
首先尝试在本地计算机上运行bundle安装,这将更新您的Gemfile.lock,然后尝试将代码推送到heroku问题是当前已关闭。检查
Bundler检查依赖关系,如果无法得到答案,则随后将失败。rubygems的人正在调查这个问题。是的,我尝试了“bundle安装”,但没有解决问题。可能是没有将gemfile.lock添加到提交中?