繁体   English   中英

Heroku:无法通过 Bundler 安装 gem,无法推送应用

[英]Heroku: Failed to install gems via Bundler, could not push app

我正在尝试推送,但说它无法安装 gems。 已经尝试了所有关于堆栈溢出的流行解决方案,但没有运气。 请看一看!

Behemoth:website$ git push heroku master
Counting objects: 136, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (135/135), done.
Writing objects: 100% (136/136), 289.16 KiB | 0 bytes/s, done.
Total 136 (delta 71), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using bundler 1.9.7
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
remote:        Your Gemfile lists the gem rails (= 4.2.2) more than once.
remote:        You should probably keep only one of them.
remote:        While it's not a problem now, it could cause errors if you change the version of just one of them later.
remote:        You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:        You have added to the Gemfile:
remote:        * nokogiri (>= 1.5.11, ~> 1.5)
remote:        You have deleted from the Gemfile:
remote:        * nokogiri (>= 1.5.11, ~> 1.5)
remote:        Bundler Output: Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
remote:        Your Gemfile lists the gem rails (= 4.2.2) more than once.
remote:        You should probably keep only one of them.
remote:        While it's not a problem now, it could cause errors if you change the version of just one of them later.
remote:        You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:        
remote:        You have added to the Gemfile:
remote:        * nokogiri (>= 1.5.11, ~> 1.5)
remote:        
remote:        You have deleted from the Gemfile:
remote:        * nokogiri (>= 1.5.11, ~> 1.5)
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy...
remote: 
remote: !       Push rejected to website.
remote: 
To https://git.heroku.com/website.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/website.git'

我已经尝试过 bundle update, git add ., git commit -m "message", git push heroku master

这是我的 Gemfile.lock

 GEM
  remote: https://rubygems.org/
  specs:
    CFPropertyList (2.3.2)
    actionmailer (4.2.2)
      actionpack (= 4.2.2)
      actionview (= 4.2.2)
      activejob (= 4.2.2)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.2)
      actionview (= 4.2.2)
      activesupport (= 4.2.2)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    actionview (4.2.2)
      activesupport (= 4.2.2)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    activejob (4.2.2)
      activesupport (= 4.2.2)
      globalid (>= 0.3.0)
    activemodel (4.2.2)
      activesupport (= 4.2.2)
      builder (~> 3.1)
    activerecord (4.2.2)
      activemodel (= 4.2.2)
      activesupport (= 4.2.2)
      arel (~> 6.0)
    activesupport (4.2.2)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    arel (6.0.3)
    bcrypt (3.1.7)
    binding_of_caller (0.7.3.pre1)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (3.2.0.0)
      sass (~> 3.2)
    bootstrap-will_paginate (0.0.10)
      will_paginate
    builder (3.2.2)
    byebug (3.4.0)
      columnize (~> 0.8)
      debugger-linecache (~> 1.2)
      slop (~> 3.6)
    carrierwave (0.10.0)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      json (>= 1.7)
      mime-types (>= 1.16)
    coffee-rails (4.1.0)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.10.0)
    columnize (0.9.0)
    concurrent-ruby (1.0.0)
    debug_inspector (0.0.2)
    debugger-linecache (1.2.0)
    erubis (2.7.0)
    excon (0.45.4)
    execjs (2.6.0)
    faker (1.4.2)
      i18n (~> 0.5)
    fission (0.5.0)
      CFPropertyList (~> 2.2)
    fog (1.36.0)
      fog-aliyun (>= 0.1.0)
      fog-atmos
      fog-aws (>= 0.6.0)
      fog-brightbox (~> 0.4)
      fog-core (~> 1.32)
      fog-dynect (~> 0.0.2)
      fog-ecloud (~> 0.1)
      fog-google (<= 0.1.0)
      fog-json
      fog-local
      fog-powerdns (>= 0.1.1)
      fog-profitbricks
      fog-radosgw (>= 0.0.2)
      fog-riakcs
      fog-sakuracloud (>= 0.0.4)
      fog-serverlove
      fog-softlayer
      fog-storm_on_demand
      fog-terremark
      fog-vmfusion
      fog-voxel
      fog-xenserver
      fog-xml (~> 0.1.1)
      ipaddress (~> 0.5)
      nokogiri (~> 1.5, >= 1.5.11)
    fog-aliyun (0.1.0)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      ipaddress (~> 0.8)
      xml-simple (~> 1.1)
    fog-atmos (0.1.0)
      fog-core
      fog-xml
    fog-aws (0.8.1)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      fog-xml (~> 0.1)
      ipaddress (~> 0.8)
    fog-brightbox (0.10.1)
      fog-core (~> 1.22)
      fog-json
      inflecto (~> 0.0.2)
    fog-core (1.35.0)
      builder
      excon (~> 0.45)
      formatador (~> 0.2)
    fog-dynect (0.0.2)
      fog-core
      fog-json
      fog-xml
    fog-ecloud (0.3.0)
      fog-core
      fog-xml
    fog-google (0.1.0)
      fog-core
      fog-json
      fog-xml
    fog-json (1.0.2)
      fog-core (~> 1.0)
      multi_json (~> 1.10)
    fog-local (0.2.1)
      fog-core (~> 1.27)
    fog-powerdns (0.1.1)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      fog-xml (~> 0.1)
    fog-profitbricks (0.0.5)
      fog-core
      fog-xml
      nokogiri
    fog-radosgw (0.0.5)
      fog-core (>= 1.21.0)
      fog-json
      fog-xml (>= 0.0.1)
    fog-riakcs (0.1.0)
      fog-core
      fog-json
      fog-xml
    fog-sakuracloud (1.7.5)
      fog-core
      fog-json
    fog-serverlove (0.1.2)
      fog-core
      fog-json
    fog-softlayer (1.0.3)
      fog-core
      fog-json
    fog-storm_on_demand (0.1.1)
      fog-core
      fog-json
    fog-terremark (0.1.0)
      fog-core
      fog-xml
    fog-vmfusion (0.1.0)
      fission
      fog-core
    fog-voxel (0.1.0)
      fog-core
      fog-xml
    fog-xenserver (0.2.3)
      fog-core
      fog-xml
    fog-xml (0.1.2)
      fog-core
      nokogiri (~> 1.5, >= 1.5.11)
    formatador (0.2.5)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    i18n (0.7.0)
    inflecto (0.0.2)
    ipaddress (0.8.2)
    jbuilder (2.2.3)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-rails (4.0.3)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (1.8.3)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.99)
    mini_magick (3.8.0)
      subexec (~> 0.2.1)
    mini_portile2 (2.0.0)
    minitest (5.8.4)
    modernizr-rails (2.7.1)
    multi_json (1.11.2)
    nokogiri (1.6.7.2)
      mini_portile2 (~> 2.0.0.rc2)
    pg (0.18.4)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.2)
      actionmailer (= 4.2.2)
      actionpack (= 4.2.2)
      actionview (= 4.2.2)
      activejob (= 4.2.2)
      activemodel (= 4.2.2)
      activerecord (= 4.2.2)
      activesupport (= 4.2.2)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.2)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (4.2.2)
      actionpack (= 4.2.2)
      activesupport (= 4.2.2)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.5.0)
    rdoc (4.2.1)
      json (~> 1.4)
    sass (3.4.21)
    sass-rails (5.0.2)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (~> 1.1)
    sdoc (0.4.0)
      json (~> 1.8)
      rdoc (~> 4.0, < 5.0)
    slop (3.6.0)
    spring (1.1.3)
    sprockets (3.5.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.0.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.3.9)
    subexec (0.2.3)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (1.4.1)
    turbolinks (2.3.0)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.5.3)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    web-console (2.0.0.beta3)
      activemodel (~> 4.0)
      binding_of_caller (= 0.7.3.pre1)
      railties (~> 4.0)
      sprockets-rails (>= 2.0, < 4.0)
    will_paginate (3.0.7)
    wow-rails (0.0.1)
    xml-simple (1.1.5)

PLATFORMS
  ruby

DEPENDENCIES
  bcrypt (= 3.1.7)
  bootstrap-sass (= 3.2.0.0)
  bootstrap-will_paginate (= 0.0.10)
  byebug (= 3.4.0)
  carrierwave (= 0.10.0)
  coffee-rails (= 4.1.0)
  faker (= 1.4.2)
  fog (= 1.36.0)
  jbuilder (= 2.2.3)
  jquery-rails (= 4.0.3)
  mini_magick (= 3.8.0)
  modernizr-rails
  nokogiri (~> 1.5, >= 1.5.11)
  pg (= 0.18.4)
  rails (= 4.2.2)
  sass-rails (= 5.0.2)
  sdoc (= 0.4.0)
  spring (= 1.1.3)
  sqlite3 (= 1.3.9)
  turbolinks (= 2.3.0)
  uglifier (= 2.5.3)
  web-console (= 2.0.0.beta3)
  will_paginate (= 3.0.7)
  wow-rails

BUNDLED WITH
   1.11.2

尝试以下操作,更新您的打包程序:

gem update bundler

如果你也发布你的 gem 文件会很有帮助。 这个问题可能是因为你的 Gemfile 和你的 .lock 不一致,为了丢弃它,请删除你的 Gemfile.lock 并再次生成它运行bundle install

至于排查过程,可以将旧的gemfile.lock复制到安全的地方,然后重新生成gemfile.lock,并与diff比较

如果上述方法不起作用,请阅读本主题以及与您的问题相关的几种解决方案,全部尝试。

我最终删除了两个我没有真正使用过的 gem 文件,这有助于我进行推送。 我不确定宝石的要求之间是否存在冲突,这是否导致了问题。 我删除的是雾和nokogiri

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM