1

我正在尝试推送到 Heroku,它坚持尝试安装我的应用程序中没有的 gem。我已将最新更改提交到我的 git 存储库。宝石是锄头。我已经尝试了错误日志中建议的版本,但没有成功。生产不需要它,所以我决定尝试将它从推送中排除。

好吧,乔,它必须是.lock 中另一个宝石的依赖项...... 错误,不存在。

好吧,乔,它一定与 rvm 全局 gemset 有关。即使没有,我也删除了全局,但仍然没有运气。

推送到heroku的输出:

    Counting objects: 156, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (142/142), done.
Writing objects: 100% (156/156), 259.71 KiB | 158 KiB/s, done.
Total 156 (delta 27), reused 0 (delta 0)

-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/........
       Fetching gem metadata from https://rubygems.org/..
       Installing rake (10.0.3)
       Installing i18n (0.6.1)
       Installing multi_json (1.6.1)
       Installing activesupport (3.2.12)
       Installing builder (3.0.4)
       Installing activemodel (3.2.12)
       Installing erubis (2.7.0)
       Installing journey (1.0.4)
       Installing rack (1.4.5)
       Installing rack-cache (1.2)
       Installing rack-test (0.6.2)
       Installing hike (1.2.1)
       Installing tilt (1.3.3)
       Installing sprockets (2.2.2)
       Installing actionpack (3.2.12)
       Installing mime-types (1.21)
       Installing polyglot (0.3.3)
       Installing treetop (1.4.12)
       Installing mail (2.4.4)
       Installing actionmailer (3.2.12)
       Installing arel (3.0.2)
       Installing tzinfo (0.3.35)
       Installing activerecord (3.2.12)
       Installing activeresource (3.2.12)
       Installing net-ldap (0.3.1)
       Installing adauth (1.2.1)
       Installing sass (3.2.6)
       Installing bootstrap-sass (2.3.0.1)
       Installing carrierwave (0.8.0)
       Installing coffee-script-source (1.4.0)
       Installing execjs (1.4.0)
       Installing coffee-script (2.2.0)
       Installing rack-ssl (1.3.3)
       Installing json (1.7.7)
       Installing rdoc (3.12.1)
       Installing thor (0.17.0)
       Installing railties (3.2.12)
       Installing coffee-rails (3.2.2)
       Installing commonjs (0.2.6)
       Installing formtastic (2.2.1)
       Installing formtastic-bootstrap (2.0.0)
       Installing hoe (3.5.0)
       Gem::InstallError: hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself.
       An error occurred while installing hoe (3.5.0), and Bundler cannot continue.
       Make sure that `gem install hoe -v '3.5.0'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

To git@heroku.com:enigmatic-ravine-4893.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:enigmatic-ravine-4893.git'

我的红宝石很好。一定是heroku不是(Wut?):

$ ~/Documents/workspace/archive $ gem -v
2.0.3

我的宝石都不需要锄头:

$ ~/Documents/workspace/archive $ gem dependencies hoe --reverse-dependencies
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command dependencies
$ ~/Documents/workspace/archive $ gem dependency hoe --reverse-dependencies
No gems found matching hoe (>= 0)

Gemfile.lock(没有提到锄头):

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (3.2.11)
      actionpack (= 3.2.11)
      mail (~> 2.4.4)
    actionpack (3.2.11)
      activemodel (= 3.2.11)
      activesupport (= 3.2.11)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.0)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.11)
      activesupport (= 3.2.11)
      builder (~> 3.0.0)
    activerecord (3.2.11)
      activemodel (= 3.2.11)
      activesupport (= 3.2.11)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.11)
      activemodel (= 3.2.11)
      activesupport (= 3.2.11)
    activesupport (3.2.11)
      i18n (~> 0.6)
      multi_json (~> 1.0)
    acts-as-taggable-on (2.4.0)
      rails (~> 3.0)
    adauth (1.2.1)
      net-ldap
    arel (3.0.2)
    bcrypt-ruby (3.0.1)
    bootstrap-sass (2.3.1.0)
      sass (~> 3.2)
    builder (3.0.4)
    carrierwave (0.8.0)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.6.2)
    commonjs (0.2.6)
    diff-lcs (1.2.3)
    erubis (2.7.0)
    execjs (1.4.0)
      multi_json (~> 1.0)
    formtastic (2.2.1)
      actionpack (>= 3.0)
    formtastic-bootstrap (2.1.1)
      formtastic (~> 2.2)
    hike (1.2.2)
    i18n (0.6.4)
    journey (1.0.4)
    jquery-rails (2.2.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.7.7)
    kaminari (0.14.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    less (2.3.2)
      commonjs (~> 0.2.6)
    less-rails (2.3.3)
      actionpack (>= 3.1)
      less (~> 2.3.1)
    libv8 (3.11.8.17)
    mail (2.4.4)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    meta_request (0.2.3)
      rack-contrib
      railties
    mime-types (1.22)
    mini_portile (0.5.0)
    minitest (4.7.2)
    multi_json (1.7.2)
    net-ldap (0.3.1)
    nokogiri (1.5.9)
    pg (0.15.1)
    polyglot (0.3.3)
    racc (1.4.9)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-contrib (1.1.0)
      rack (>= 0.9.1)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.11)
      actionmailer (= 3.2.11)
      actionpack (= 3.2.11)
      activerecord (= 3.2.11)
      activeresource (= 3.2.11)
      activesupport (= 3.2.11)
      bundler (~> 1.0)
      railties (= 3.2.11)
    railties (3.2.11)
      actionpack (= 3.2.11)
      activesupport (= 3.2.11)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.0.4)
    rake-compiler (0.8.3)
      rake
    rdoc (3.12.2)
      json (~> 1.4)
    ref (1.0.4)
    rexical (1.0.5)
    rspec-core (2.13.1)
    rspec-expectations (2.13.0)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.13.1)
    rspec-rails (2.13.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.13.0)
      rspec-expectations (~> 2.13.0)
      rspec-mocks (~> 2.13.0)
    sass (3.2.7)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    therubyracer (0.11.4)
      libv8 (~> 3.11.8.12)
      ref
    thor (0.18.1)
    tilt (1.3.7)
    treetop (1.4.12)
      polyglot
      polyglot (>= 0.3.1)
    twitter-bootstrap-rails (2.2.6)
      actionpack (>= 3.1)
      execjs
      railties (>= 3.1)
    tzinfo (0.3.37)
    uglifier (2.0.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    validates_existence (0.8.0)
    webrat (0.7.3)
      nokogiri (>= 1.2.0)
      rack (>= 1.0)
      rack-test (>= 0.5.3)
    yaml_db (0.2.3)

PLATFORMS
  ruby

DEPENDENCIES
  acts-as-taggable-on
  adauth (~> 1.2.1)
  bcrypt-ruby
  bootstrap-sass
  bundler (~> 1.3.5)
  carrierwave
  coffee-rails (~> 3.2.1)
  formtastic
  formtastic-bootstrap
  jquery-rails
  kaminari
  less-rails
  meta_request
  mini_portile
  minitest
  pg
  racc
  rails (= 3.2.11)
  rake-compiler
  rdoc
  rexical
  rspec-rails (~> 2.0)
  sass-rails (~> 3.2.3)
  therubyracer
  twitter-bootstrap-rails
  uglifier (>= 1.0.3)
  validates_existence
  webrat
  yaml_db
4

2 回答 2

0

我感谢大家的帮助。问题是我的 git repo 有其他版本的应用程序,其中一个用于上传。感谢您指出@sevenseacat。

于 2013-04-20T14:59:17.850 回答
0

好吧,首先确保你有 ruby​​gems 的更新版本,对于 ruby​​ 1.9.3 及更高版本,你应该拥有 ruby​​gems v 2.0 及更高版本

如果你的 ruby​​gems 低于 1.4,你真的需要更新

第二,试试这个

gem dependency hoe --reverse-dependencies

看看有什么需要

于 2013-04-20T14:14:01.393 回答