rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 2k forks source link

Running `bundle pack` can cause "undefined method source_uri" #3158

Closed indirect closed 8 years ago

indirect commented 10 years ago

Here's the backtrace:

$ bundle pack
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/andre/src/bundler/bundler/lib/bundler/source/rubygems.rb:332:in `fetch_gem': undefined method `source_uri' for nil:NilClass (NoMethodError)
        from /Users/andre/src/bundler/bundler/lib/bundler/source/rubygems.rb:162:in `cached_built_in_gem'
        from /Users/andre/src/bundler/bundler/lib/bundler/source/rubygems.rb:148:in `cache'
        from /Users/andre/src/bundler/bundler/lib/bundler/runtime.rb:114:in `block in cache'
        from /Users/andre/src/bundler/bundler/lib/bundler/runtime.rb:112:in `cache'
        from /Users/andre/src/bundler/bundler/lib/bundler/cli/install.rb:79:in `run'
        from /Users/andre/src/bundler/bundler/lib/bundler/cli/package.rb:23:in `install'
        from /Users/andre/src/bundler/bundler/lib/bundler/cli/package.rb:13:in `run'
        from /Users/andre/src/bundler/bundler/lib/bundler/cli.rb:238:in `package'
        from /Users/andre/src/bundler/bundler/lib/bundler/vendor/thor/command.rb:27:in `run'
        from /Users/andre/src/bundler/bundler/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
        from /Users/andre/src/bundler/bundler/lib/bundler/vendor/thor.rb:363:in `dispatch'
        from /Users/andre/src/bundler/bundler/lib/bundler/vendor/thor/base.rb:440:in `start'
        from /Users/andre/src/bundler/bundler/lib/bundler/cli.rb:9:in `start'
        from /Users/andre/src/bundler/bundler/bin/bundle:20:in `block in <main>'
        from /Users/andre/src/bundler/bundler/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
        from /Users/andre/src/bundler/bundler/bin/bundle:18:in `<main>'

I've gisted the output from bundle env here: https://gist.github.com/indirect/c6a472dad35636f58eb4

nevinera commented 9 years ago

I was also receiving this error - in my case the context appears to be related to gemfury. I can't submit bundle env, since it has credentials in it.

Fetching gem metadata from https://gem.fury.io/emcien/...
Fetching additional metadata from https://gem.fury.io/emcien/..
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!

The exception was raising out of cached_built_in_gem - remote_specs.search(spec) is returning an empty list.

Updating bundler from 1.7.12 -> 1.8.2 completely fixed the problem for me.

TimMoore commented 9 years ago

Thanks for letting us know, @nevinera!

I'll close this issue, then. If anyone else still gets this under 1.8.x+, please comment here with details (you can replace any private details in bundler env output with dummy credentials).

iambaozheng commented 9 years ago

hi @TimMoore , i met the same problem:

☁  baozheng [master]  bundle package --all
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.5.1
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.5
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.5
Using loofah 2.0.1
Using rails-html-sanitizer 1.0.1
Using actionview 4.2.0
Using rack 1.6.0
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.0
Using activejob 4.2.0
Using mime-types 1.25.1
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemodel 4.2.0
Using arel 6.0.0
Using activerecord 4.2.0
Using acts-as-taggable-on 3.4.3
Using addressable 2.3.6
Using angularjs-rails-resource 1.1.1
Using execjs 2.2.2
Using autoprefixer-rails 5.0.0
Using awesome_nested_set 3.0.2
Using awesome_print 1.6.1
Using descendants_tracker 0.0.4
Using ice_nine 0.11.1
Using axiom-types 0.1.1
Using bcrypt 3.1.9
Using coderay 1.1.0
Using better_errors 2.1.1
Using thor 0.19.1
Using railties 4.2.0
Using momentjs-rails 2.9.0
Using bootstrap3-datetimepicker-rails 3.1.3
Using bootstrap_flash_messages 1.0.0
Using browser 0.8.0
Using cancancan 1.10.1
Using colorize 0.7.5
Using net-ssh 2.9.2
Using net-scp 1.2.1
Using sshkit 1.6.1
Using capistrano 3.1.0
Using capistrano-bundler 1.1.3
Using capistrano-rails 1.1.2
Using capistrano-rvm 0.1.2 from git://github.com/capistrano/rvm.git (at master)
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using chronic 0.10.2
Using climate_control 0.0.3
Using cocaine 0.5.5
Using coercible 1.0.0
Using coffee-script-source 1.8.0
Using coffee-script 2.3.0
Using coffee-rails 4.1.0
Using commonjs 0.2.7
Using daemons 1.1.9
Using delayed_job 4.0.6
Using delayed_job_active_record 4.0.3
Using orm_adapter 0.5.0
Using responders 2.0.2
Using warden 1.2.3
Using devise 3.4.1
Using devise-async 0.9.0
Using diff-lcs 1.2.5
Using diffy 3.0.7
Using doorkeeper 1.4.0
Using eventmachine 1.0.4
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using equalizer 0.0.9
Using faker 1.4.3
Using ffi 1.9.6
Using formatador 0.2.5
Using hashie 3.4.0
Using multi_json 1.10.1
Using multi_xml 0.5.5
Using rack-accept 0.4.5
Using rack-mount 0.8.3
Using virtus 1.0.4
Using grape 0.10.1
Using grape-doorkeeper 0.0.2
Using rabl 0.11.6
Using tilt 1.4.1
Using grape-rabl 0.3.0
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.5
Using listen 2.8.5
Using lumberjack 1.0.9
Using nenv 0.2.0
Using shellany 0.0.1
Using notiffany 0.0.3
Using method_source 0.8.2
Using slop 3.6.0
Using pry 0.10.1
Using guard 2.11.1
Using guard-compat 1.2.1
Using guard-coffeescript 2.0.1
Using less 2.6.0
Using guard-less 2.0.0
Using guard-livereload 2.4.0
Using sass 3.4.9
Using guard-sass 1.6.0
Using hike 1.2.3
Using hirb 0.7.2
Using hpricot 0.8.6
Using html2slim 0.1.0
Using jbuilder 2.2.6
Using jquery-fileupload-rails 0.4.2
Using jquery-rails 4.0.3
Using launchy 2.4.3
Using less-rails 2.6.0
Using letter_opener 1.3.0
Using libv8 3.16.14.7
Using mysql2 0.3.17
Using nprogress-rails 0.1.6.5
Using oj 2.11.4
Using omniauth 1.2.2
Using paperclip 4.2.1
Using paranoia 2.0.4
Using polyamorous 1.1.0
Using pry-nav 0.2.4
Using pry-rails 0.3.2
Using pry-remote 0.1.8
Using quiet_assets 1.1.0
Using rack-utf8_sanitizer 1.2.4
Using bundler 1.8.5
Using sprockets 2.12.3
Using sprockets-rails 2.2.2
Using rails 4.2.0
Using rails-i18n 4.0.3
Using rails_config 0.4.2
Using rdoc 4.2.0
Using ref 1.0.5
Using uber 0.0.13
Using representable 2.1.4
Using roar 1.0.0
Using test_xml 0.1.7
Using roar-rails 1.0.1
Using rspec-support 3.0.4
Using rspec-core 3.0.4
Using rspec-expectations 3.0.4
Using rspec-mocks 3.0.4
Using rspec-rails 3.0.2
Using sass-rails 5.0.1
Using sdoc 0.4.1
Using select2-rails 3.5.9.1
Using simple_form 3.1.0
Using temple 0.7.5
Using slim 3.0.1
Using slim-rails 3.0.1
Using spring 1.2.0
Using squeel 1.2.2 from git://github.com/danielrhodes/squeel.git (at master)
Using therubyracer 0.12.1
Using thin 1.6.3
Using twitter-bootstrap-rails 3.1.1 from https://github.com/seyhunak/twitter-bootstrap-rails.git (at bootstrap3)
Using uglifier 2.7.0
Using whenever 0.9.4
Using zeroclipboard-rails 0.1.0
Updating files in vendor/cache
Fetching gem metadata from https://rails-assets.org/..
Fetching version metadata from https://rails-assets.org/.
――― ERROR REPORT TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――
- What did you do?
- What did you expect to happen?
- What happened instead?

Error details

    NoMethodError: undefined method `source_uri' for nil:NilClass
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/source/rubygems.rb:359:in `fetch_gem'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/source/rubygems.rb:168:in `cached_built_in_gem'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/source/rubygems.rb:151:in `cache'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/runtime.rb:116:in `block in cache'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/runtime.rb:113:in `cache'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/cli/install.rb:81:in `run'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/cli/package.rb:32:in `install'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/cli/package.rb:16:in `run'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/cli.rb:258:in `package'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/vendor/thor/command.rb:27:in `run'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/vendor/thor.rb:363:in `dispatch'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/vendor/thor/base.rb:440:in `start'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/cli.rb:10:in `start'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/bin/bundle:20:in `block in <top (required)>'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/lib/bundler/friendly_errors.rb:6:in `with_friendly_errors'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/gems/bundler-1.8.5/bin/bundle:18:in `<top (required)>'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/bin/bundle:23:in `load'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/bin/bundle:23:in `<main>'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/bin/ruby_executable_hooks:15:in `eval'
    /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng/bin/ruby_executable_hooks:15:in `<main>'

Environment

    Bundler   1.8.5
    Rubygems  2.4.5
    Ruby      2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
    GEM_HOME  /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng
    GEM_PATH  /Users/zuozuo/.rvm/gems/ruby-2.2.0@baozheng:/Users/zuozuo/.rvm/gems/ruby-2.2.0@global
    RVM       1.26.10 (latest)
    Git       1.9.3 (Apple Git-50)
    rubygems-bundler (1.4.4)

Bundler settings

    cache_all
      Set for your local app (/Users/zuozuo/baozheng/.bundle/config): true
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=undefined+method+%60source_uri%27+for+nil%3ANilClass&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new
TimMoore commented 9 years ago

Thanks, @iambaozheng!

liveh2o commented 9 years ago

Oddly, I saw this after adding sdoc to my Gemfile:

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

Removing it resolved the problem. I then added it again, but without the group block and it worked just fine. I then added in the group block and it is still working. I have no idea why, but it seems to be resolved.

Just in case, here is my current bundle env, even though it's working:

Environment

    Bundler   1.8.5
    Rubygems  2.4.6
    Ruby      2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
    GEM_HOME  /Users/ah/.rvm/gems/ruby-2.2.0@synchronicity
    GEM_PATH  /Users/ah/.rvm/gems/ruby-2.2.0@synchronicity:/Users/ah/.rvm/gems/ruby-2.2.0@global
    RVM       1.26.10 (latest)
    Git       2.3.1
    rubygems-bundler (1.4.4)

Bundler settings

    jobs
      Set for the current user (/Users/ah/.bundle/config): "4"

Gemfile

    source 'https://rubygems.org'

    # Rails and its supporting gems
    gem 'rails', '4.1.9'

    # Private gems (#mdtech represent!)
    source 'http://gems.moneydesktop.com' do
      gem 'active_remote-pagination'
      gem 'atlas'
      gem 'babou'
      gem 'buttress'
      gem 'lockout'
      gem 'md-default_categories'
      gem 'minimus'
    end

    # Public gems
    gem 'active_attr'
    gem 'active_remote'
    gem 'active_remote-cached'
    gem 'httpclient'
    gem 'redis-rails'
    gem 'progress_bar'
    gem 'protected_attributes'
    gem 'rabl'
    gem 'safe_yaml'
    gem 'sidekiq'
    gem 'strong_routes'
    gem 'will_paginate'
    gem 'zendesk_api'

    # JRuby-specific gems
    platforms :jruby do
      gem 'activerecord-jdbcpostgresql-adapter'
      gem 'json'
    end

    # MRI-specific gems
    platforms :ruby do
      gem 'pg'
      gem 'oj'
    end

    # Run it with Puma
    gem 'puma'

    # Deploy it with Trebuchet
    gem 'trebuchet', group: [:development]

    # So we have it when we need it
    gem 'pry', group: [:development, :test, :sandbox, :qa]

    # Test it with RSpec
    gem 'rspec-rails', group: [:development, :test]

    group :development do
      gem 'md-yard'
      gem 'rubocop', require: false
    end

    group :test do
      gem 'factory_girl_rails'
      gem 'nyan-cat-formatter'
      gem 'rspec-its'
      gem 'rspec-pride'
      gem 'rspec-rabl'
      gem 'shoulda'
      gem 'simplecov', require: false
      gem 'timecop'
    end

    group :doc do
      # bundle exec rake doc:rails generates the API under doc/api.
      gem 'sdoc', require: false
    end

Gemfile.lock

    GEM
      remote: https://rubygems.org/
      remote: http://gems.moneydesktop.com/
      specs:
        action_subscriber (1.0.4)
          activesupport (>= 3.2)
          bunny (>= 1.5.0)
          lifeguard
          middleware
        actionmailer (4.1.9)
          actionpack (= 4.1.9)
          actionview (= 4.1.9)
          mail (~> 2.5, >= 2.5.4)
        actionpack (4.1.9)
          actionview (= 4.1.9)
          activesupport (= 4.1.9)
          rack (~> 1.5.2)
          rack-test (~> 0.6.2)
        actionview (4.1.9)
          activesupport (= 4.1.9)
          builder (~> 3.1)
          erubis (~> 2.7.0)
        active_attr (0.8.5)
          activemodel (>= 3.0.2, < 5.0)
          activesupport (>= 3.0.2, < 5.0)
        active_remote (2.1.1)
          active_attr (>= 0.8)
          activesupport (>= 3.2)
          protobuf (>= 3.0)
        active_remote-cached (0.0.9)
          active_remote
          activesupport
        active_remote-pagination (2.0.0)
          active_remote (>= 2.1.0)
          concurrent-ruby
          will_paginate
        activemodel (4.1.9)
          activesupport (= 4.1.9)
          builder (~> 3.1)
        activerecord (4.1.9)
          activemodel (= 4.1.9)
          activesupport (= 4.1.9)
          arel (~> 5.0.0)
        activerecord-jdbc-adapter (1.3.15)
          activerecord (>= 2.2)
        activerecord-jdbcpostgresql-adapter (1.3.15)
          activerecord-jdbc-adapter (~> 1.3.15)
          jdbc-postgres (>= 9.1)
        activesupport (4.1.9)
          i18n (~> 0.6, >= 0.6.9)
          json (~> 1.7, >= 1.7.7)
          minitest (~> 5.1)
          thread_safe (~> 0.1)
          tzinfo (~> 1.1)
        algorithms (0.6.1)
        amq-protocol (1.9.2)
        arel (5.0.1.20140414130214)
        ast (2.0.0)
        astrolabe (1.3.0)
          parser (>= 2.2.0.pre.3, < 3.0)
        atlas (3.6.10)
          activesupport (>= 3.2)
          ffi-rzmq (>= 2.0)
          guid (>= 0.1.1)
          protobuf (>= 3.0)
        babou (1.0.3)
          action_subscriber (>= 1.0.2)
          activesupport (>= 3.2)
          thor (> 0.17)
        builder (3.2.2)
        bunny (1.7.0)
          amq-protocol (>= 1.9.2)
        buttress (2.15.2)
          activesupport (>= 3.2)
          atlas (>= 1.7.7)
          bunny (>= 1.5.0)
          heredity (>= 0.1.1)
          honeybadger (>= 1.11.0, < 2.0.0)
          ignorable (>= 0.2.0)
          lumberjack
          lumberjack_syslog_device
          progress_bar (>= 1.0.0)
          safe_yaml
          statsd-ruby
          sucker_punch (>= 1.0)
          thor (> 0.17)
        buttress (2.15.2-java)
          activesupport (>= 3.2)
          atlas (>= 1.7.7)
          heredity (>= 0.1.1)
          honeybadger (>= 1.11.0, < 2.0.0)
          ignorable (>= 0.2.0)
          lumberjack
          lumberjack_syslog_device
          march_hare (>= 2.7.0)
          progress_bar (>= 1.0.0)
          safe_yaml
          statsd-ruby
          sucker_punch (>= 1.0)
          thor (> 0.17)
        capistrano (2.15.5)
          highline
          net-scp (>= 1.0.0)
          net-sftp (>= 2.0.0)
          net-ssh (>= 2.0.14)
          net-ssh-gateway (>= 1.1.0)
        capistrano-deploytags (0.9.2)
          capistrano
          capistrano-ext
        capistrano-ext (1.2.1)
          capistrano (>= 1.0.0)
        capistrano_colors (0.5.5)
        celluloid (0.16.0)
          timers (~> 4.0.0)
        coderay (1.1.0)
        colored (1.2)
        concurrent-ruby (0.8.0)
          ref (~> 1.0, >= 1.0.5)
        connection_pool (2.1.2)
        diff-lcs (1.2.5)
        docile (1.1.5)
        erubis (2.7.0)
        factory_girl (4.5.0)
          activesupport (>= 3.0.0)
        factory_girl_rails (4.5.0)
          factory_girl (~> 4.5.0)
          railties (>= 3.0.0)
        faraday (0.9.1)
          multipart-post (>= 1.2, < 3)
        ffi (1.9.8)
        ffi (1.9.8-java)
        ffi-rzmq (2.0.4)
          ffi-rzmq-core (>= 1.0.1)
        ffi-rzmq-core (1.0.3)
          ffi (~> 1.9)
        firebolt (0.12.0)
          json
          rufus-scheduler (~> 3.0)
          sucker_punch (>= 1.0)
        guid (0.1.1)
        hashie (3.4.0)
        heredity (0.1.1)
        highline (1.6.21)
        hike (1.2.3)
        hitimes (1.2.2)
        hitimes (1.2.2-java)
        honeybadger (1.16.7)
          json
        httpclient (2.6.0.1)
        i18n (0.7.0)
        ignorable (0.2.0)
          activerecord (>= 3)
        inflection (1.0.0)
        jdbc-postgres (9.4.1200)
        json (1.8.2)
        json (1.8.2-java)
        lifeguard (0.0.8)
        lockout (2.5.2)
          actionpack
          active_remote
          activesupport
          atlas (> 1.0.0)
          buttress
          urlcrypt
          warden
        lumberjack (1.0.9)
        lumberjack_syslog_device (1.0.0)
          lumberjack (~> 1.0)
        mail (2.6.3)
          mime-types (>= 1.16, < 3)
        march_hare (2.8.0-java)
        md-default_categories (0.2.3)
          active_remote
          algorithms
          atlas
        md-yard (0.0.1)
          yard
        method_source (0.8.2)
        middleware (0.1.0)
        mime-types (2.4.3)
        minimus (0.3.2)
          activesupport
          atlas
          firebolt
          rack
        minitest (5.5.1)
        multi_json (1.11.0)
        multipart-post (2.0.0)
        net-scp (1.2.1)
          net-ssh (>= 2.6.5)
        net-sftp (2.1.2)
          net-ssh (>= 2.6.5)
        net-ssh (2.9.2)
        net-ssh-gateway (1.2.0)
          net-ssh (>= 2.6.5)
        nyan-cat-formatter (0.11)
          rspec (>= 2.99, >= 2.14.2, < 4)
        oj (2.12.1)
        options (2.3.2)
        parser (2.2.0.3)
          ast (>= 1.1, < 3.0)
        pg (0.18.1)
        powerpack (0.1.0)
        progress_bar (1.0.3)
          highline (~> 1.6.1)
          options (~> 2.3.0)
        protected_attributes (1.0.9)
          activemodel (>= 4.0.1, < 5.0)
        protobuf (3.4.4)
          activesupport (>= 3.2)
          middleware
          thor
          thread_safe
        pry (0.10.1)
          coderay (~> 1.1.0)
          method_source (~> 0.8.1)
          slop (~> 3.4)
        pry (0.10.1-java)
          coderay (~> 1.1.0)
          method_source (~> 0.8.1)
          slop (~> 3.4)
          spoon (~> 0.0)
        puma (2.11.1)
          rack (>= 1.1, < 2.0)
        puma (2.11.1-java)
          rack (>= 1.1, < 2.0)
        rabl (0.11.6)
          activesupport (>= 2.3.14)
        rack (1.5.2)
        rack-test (0.6.3)
          rack (>= 1.0)
        rails (4.1.9)
          actionmailer (= 4.1.9)
          actionpack (= 4.1.9)
          actionview (= 4.1.9)
          activemodel (= 4.1.9)
          activerecord (= 4.1.9)
          activesupport (= 4.1.9)
          bundler (>= 1.3.0, < 2.0)
          railties (= 4.1.9)
          sprockets-rails (~> 2.0)
        railties (4.1.9)
          actionpack (= 4.1.9)
          activesupport (= 4.1.9)
          rake (>= 0.8.7)
          thor (>= 0.18.1, < 2.0)
        rainbow (2.0.0)
        rake (10.4.2)
        rdoc (4.2.0)
        redis (3.2.1)
        redis-actionpack (4.0.0)
          actionpack (~> 4)
          redis-rack (~> 1.5.0)
          redis-store (~> 1.1.0)
        redis-activesupport (4.0.0)
          activesupport (~> 4)
          redis-store (~> 1.1.0)
        redis-namespace (1.5.1)
          redis (~> 3.0, >= 3.0.4)
        redis-rack (1.5.0)
          rack (~> 1.5)
          redis-store (~> 1.1.0)
        redis-rails (4.0.0)
          redis-actionpack (~> 4)
          redis-activesupport (~> 4)
          redis-store (~> 1.1.0)
        redis-store (1.1.4)
          redis (>= 2.2)
        ref (1.0.5)
        rspec (3.2.0)
          rspec-core (~> 3.2.0)
          rspec-expectations (~> 3.2.0)
          rspec-mocks (~> 3.2.0)
        rspec-core (3.2.2)
          rspec-support (~> 3.2.0)
        rspec-expectations (3.2.0)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.2.0)
        rspec-its (1.2.0)
          rspec-core (>= 3.0.0)
          rspec-expectations (>= 3.0.0)
        rspec-mocks (3.2.1)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.2.0)
        rspec-pride (3.1.0)
          rspec (~> 3.0)
        rspec-rabl (1.0.0)
          rabl (~> 0.9)
          rspec (~> 3.0)
        rspec-rails (3.2.1)
          actionpack (>= 3.0, < 4.3)
          activesupport (>= 3.0, < 4.3)
          railties (>= 3.0, < 4.3)
          rspec-core (~> 3.2.0)
          rspec-expectations (~> 3.2.0)
          rspec-mocks (~> 3.2.0)
          rspec-support (~> 3.2.0)
        rspec-support (3.2.2)
        rubocop (0.29.1)
          astrolabe (~> 1.3)
          parser (>= 2.2.0.1, < 3.0)
          powerpack (~> 0.1)
          rainbow (>= 1.99.1, < 3.0)
          ruby-progressbar (~> 1.4)
        ruby-progressbar (1.7.1)
        rufus-scheduler (3.0.9)
          tzinfo
        rvm-capistrano (1.5.6)
          capistrano (~> 2.15.4)
        safe_yaml (1.0.4)
        sdoc (0.4.1)
          json (~> 1.7, >= 1.7.7)
          rdoc (~> 4.0)
        shoulda (3.5.0)
          shoulda-context (~> 1.0, >= 1.0.1)
          shoulda-matchers (>= 1.4.1, < 3.0)
        shoulda-context (1.2.1)
        shoulda-matchers (2.8.0)
          activesupport (>= 3.0.0)
        sidekiq (3.3.2)
          celluloid (>= 0.16.0)
          connection_pool (>= 2.1.1)
          json
          redis (>= 3.0.6)
          redis-namespace (>= 1.3.1)
        simplecov (0.9.2)
          docile (~> 1.1.0)
          multi_json (~> 1.0)
          simplecov-html (~> 0.9.0)
        simplecov-html (0.9.0)
        slop (3.6.0)
        spoon (0.0.4)
          ffi
        sprockets (2.12.3)
          hike (~> 1.2)
          multi_json (~> 1.0)
          rack (~> 1.0)
          tilt (~> 1.1, != 1.3.0)
        sprockets-rails (2.2.4)
          actionpack (>= 3.0)
          activesupport (>= 3.0)
          sprockets (>= 2.8, < 4.0)
        statsd-ruby (1.2.1)
        steps (1.1.3)
          colored (>= 1.2)
          highline (>= 1.6)
        strong_routes (1.0.1)
          rack
        sucker_punch (1.4.0)
          celluloid (~> 0.16.0)
        thor (0.19.1)
        thread_safe (0.3.5)
        thread_safe (0.3.5-java)
        tilt (1.4.1)
        timecop (0.7.3)
        timers (4.0.1)
          hitimes
        trebuchet (4.3.1)
          activesupport (> 3.2)
          buttress (> 2.0)
          capistrano (~> 2)
          capistrano-deploytags (~> 0.9.2)
          capistrano_colors (> 0.5)
          httpclient
          rvm-capistrano (> 1.5)
          safe_yaml (> 1.0)
          steps (> 1.1)
          thor (> 0.17)
        tzinfo (1.2.2)
          thread_safe (~> 0.1)
        urlcrypt (0.1.1)
        warden (1.2.3)
          rack (>= 1.0)
        will_paginate (3.0.7)
        yard (0.8.7.6)
        zendesk_api (1.6.0)
          faraday (~> 0.9)
          hashie (>= 1.2, < 4.0)
          inflection
          mime-types
          multi_json
          multipart-post (~> 2.0)

    PLATFORMS
      java
      ruby

    DEPENDENCIES
      active_attr
      active_remote
      active_remote-cached
      active_remote-pagination!
      activerecord-jdbcpostgresql-adapter
      atlas!
      babou!
      buttress!
      factory_girl_rails
      httpclient
      json
      lockout!
      md-default_categories!
      md-yard
      minimus!
      nyan-cat-formatter
      oj
      pg
      progress_bar
      protected_attributes
      pry
      puma
      rabl
      rails (= 4.1.9)
      redis-rails
      rspec-its
      rspec-pride
      rspec-rabl
      rspec-rails
      rubocop
      safe_yaml
      sdoc
      shoulda
      sidekiq
      simplecov
      strong_routes
      timecop
      trebuchet
      will_paginate
      zendesk_api
iambaozheng commented 9 years ago

@TimMoore @liveh2o
The problem has been solved by removing the block

source 'https://rails-assets.org' do
  gem 'rails-assets-angular'
end

And it behaved the same with @liveh2o's, when i remove this , it worked, and after that i add the rails-assets block back to my Gemfile and it still worked.

mmmries commented 9 years ago

sdoc was the issue for me. I am using source blocks like @iambaozheng mentions, but those don't seem to have caused any issues

Here is my bundle env

$ bundle env
Environment

    Bundler   1.9.2
    Rubygems  2.4.5
    Ruby      2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
    GEM_HOME  /Users/michael.ries/.rvm/gems/ruby-2.2.0@bob
    GEM_PATH  /Users/michael.ries/.rvm/gems/ruby-2.2.0@bob:/Users/michael.ries/.rvm/gems/ruby-2.2.0@global
    RVM       1.26.10 (latest)
    Git       2.2.1
    rubygems-bundler (1.4.4)

Bundler settings

    gem.coc
      Set for the current user (/Users/michael.ries/.bundle/config): "false"
    gem.mit
      Set for the current user (/Users/michael.ries/.bundle/config): "true"
    gem.test
      Set for the current user (/Users/michael.ries/.bundle/config): "rspec"
    cache_all
      Set for your local app (/Users/michael.ries/deploys/bob/.bundle/config): "true"

Gemfile

    source 'https://rubygems.org'

    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
    gem 'rails', '4.1.9'

    # Internal Gems
    source 'http://gems.moneydesktop.com' do
      gem 'buttress'
      gem 'josephus', '>= 0.3.0'
      gem 'trebuchet', require: false, group: [:development]
    end

    # Public Gems
    gem 'aws-sdk'
    gem 'jbuilder', '~> 2.0'
    gem 'jquery-rails'
    gem 'plist'
    gem 'puma'
    gem 'sass-rails', '~> 4.0.3'
    gem 'sidekiq'
    gem 'sidekiq-cron'
    gem 'sinatra' , '>= 1.3.0', :require => nil # Per https://github.com/mperham/sidekiq/wiki/Monitoring#rails-3-and-4
    gem 'turbolinks'
    gem 'uglifier', '>= 1.3.0'

    group :development, :test do
      gem 'brakeman', require: false
      gem 'pry'
    end

    group :test do
      gem 'rspec-rails', '>= 3.2.0'
      gem 'simplecov', '~> 0.7.1', :require => false
    end

    # MRI-specific gems
    platform :ruby do
      gem 'spring', :group => [:test, :development]
      gem 'therubyracer'
    end

    # JRuby-specific gems
    platform :jruby do
      gem 'jruby-openssl'
      gem 'therubyrhino', :group => :assetss
    end

Gemfile.lock

    GEM
      remote: https://rubygems.org/
      remote: http://gems.moneydesktop.com/
      specs:
        actionmailer (4.1.9)
          actionpack (= 4.1.9)
          actionview (= 4.1.9)
          mail (~> 2.5, >= 2.5.4)
        actionpack (4.1.9)
          actionview (= 4.1.9)
          activesupport (= 4.1.9)
          rack (~> 1.5.2)
          rack-test (~> 0.6.2)
        actionview (4.1.9)
          activesupport (= 4.1.9)
          builder (~> 3.1)
          erubis (~> 2.7.0)
        active_attr (0.8.5)
          activemodel (>= 3.0.2, < 5.0)
          activesupport (>= 3.0.2, < 5.0)
        active_remote (2.1.1)
          active_attr (>= 0.8)
          activesupport (>= 3.2)
          protobuf (>= 3.0)
        activemodel (4.1.9)
          activesupport (= 4.1.9)
          builder (~> 3.1)
        activerecord (4.1.9)
          activemodel (= 4.1.9)
          activesupport (= 4.1.9)
          arel (~> 5.0.0)
        activesupport (4.1.9)
          i18n (~> 0.6, >= 0.6.9)
          json (~> 1.7, >= 1.7.7)
          minitest (~> 5.1)
          thread_safe (~> 0.1)
          tzinfo (~> 1.1)
        amq-protocol (1.9.2)
        arel (5.0.1.20140414130214)
        atlas (3.8.1)
          activesupport (>= 3.2)
          ffi-rzmq (>= 2.0)
          guid (>= 0.1.1)
          protobuf (>= 3.0)
        aws-sdk (2.0.36)
          aws-sdk-resources (= 2.0.36)
        aws-sdk-core (2.0.36)
          builder (~> 3.0)
          jmespath (~> 1.0)
          multi_json (~> 1.0)
        aws-sdk-resources (2.0.36)
          aws-sdk-core (= 2.0.36)
        brakeman (3.0.2)
          erubis (~> 2.6)
          fastercsv (~> 1.5)
          haml (>= 3.0, < 5.0)
          highline (~> 1.6.20)
          multi_json (~> 1.2)
          ruby2ruby (~> 2.1.1)
          ruby_parser (~> 3.6.2)
          sass (~> 3.0)
          terminal-table (~> 1.4)
        builder (3.2.2)
        bunny (1.7.0)
          amq-protocol (>= 1.9.2)
        buttress (2.15.3)
          activesupport (>= 3.2)
          atlas (>= 1.7.7)
          bunny (>= 1.5.0)
          heredity (>= 0.1.1)
          honeybadger (>= 1.11.0, < 2.0.0)
          ignorable (>= 0.2.0)
          lumberjack
          lumberjack_syslog_device
          progress_bar (>= 1.0.0)
          safe_yaml
          statsd-ruby
          sucker_punch (>= 1.0)
          thor (> 0.17)
        capistrano (2.15.5)
          highline
          net-scp (>= 1.0.0)
          net-sftp (>= 2.0.0)
          net-ssh (>= 2.0.14)
          net-ssh-gateway (>= 1.1.0)
        capistrano-deploytags (0.9.2)
          capistrano
          capistrano-ext
        capistrano-ext (1.2.1)
          capistrano (>= 1.0.0)
        capistrano_colors (0.5.5)
        celluloid (0.16.0)
          timers (~> 4.0.0)
        coderay (1.1.0)
        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.9.1)
        colored (1.2)
        connection_pool (2.1.3)
        couchrest (1.2.0)
          mime-types (~> 1.15)
          multi_json (~> 1.0)
          rest-client (~> 1.6.1)
        couchrest_model (2.0.3)
          activemodel (>= 4.0, >= 3.0)
          couchrest (>= 1.2)
          mime-types (>= 1.16)
          tzinfo (>= 0.3.22)
        diff-lcs (1.2.5)
        erubis (2.7.0)
        execjs (2.5.0)
        fastercsv (1.5.5)
        felix (1.0.3)
          active_remote (>= 2.1.1)
          activesupport (>= 4.1, < 4.2)
          atlas (>= 3.7.3)
          plist (>= 3.0)
          thor (~> 0.18.1)
          xml-simple (>= 1.1.4)
        ffi (1.9.8)
        ffi-rzmq (2.0.4)
          ffi-rzmq-core (>= 1.0.1)
        ffi-rzmq-core (1.0.3)
          ffi (~> 1.9)
        guid (0.1.1)
        haml (4.0.6)
          tilt
        heredity (0.1.1)
        highline (1.6.21)
        hike (1.2.3)
        hitimes (1.2.2)
        honeybadger (1.16.7)
          json
        httpclient (2.6.0.1)
        i18n (0.7.0)
        ignorable (0.2.0)
          activerecord (>= 3)
        jbuilder (2.2.12)
          activesupport (>= 3.0.0, < 5)
          multi_json (~> 1.2)
        jmespath (1.0.2)
          multi_json (~> 1.0)
        josephus (0.4.0)
          couchrest_model (~> 2.0)
          felix (>= 0.5.3)
          sidekiq
          sidekiq-cron
          thor (~> 0.18.1)
        jquery-rails (3.1.2)
          railties (>= 3.0, < 5.0)
          thor (>= 0.14, < 2.0)
        json (1.8.2)
        libv8 (3.16.14.7)
        lumberjack (1.0.9)
        lumberjack_syslog_device (1.0.0)
          lumberjack (~> 1.0)
        mail (2.6.3)
          mime-types (>= 1.16, < 3)
        method_source (0.8.2)
        middleware (0.1.0)
        mime-types (1.25.1)
        minitest (5.5.1)
        multi_json (1.11.0)
        net-scp (1.2.1)
          net-ssh (>= 2.6.5)
        net-sftp (2.1.2)
          net-ssh (>= 2.6.5)
        net-ssh (2.9.2)
        net-ssh-gateway (1.2.0)
          net-ssh (>= 2.6.5)
        options (2.3.2)
        plist (3.1.0)
        progress_bar (1.0.3)
          highline (~> 1.6.1)
          options (~> 2.3.0)
        protobuf (3.4.4)
          activesupport (>= 3.2)
          middleware
          thor
          thread_safe
        pry (0.10.1)
          coderay (~> 1.1.0)
          method_source (~> 0.8.1)
          slop (~> 3.4)
        puma (2.11.1)
          rack (>= 1.1, < 2.0)
        rack (1.5.2)
        rack-protection (1.5.3)
          rack
        rack-test (0.6.3)
          rack (>= 1.0)
        rails (4.1.9)
          actionmailer (= 4.1.9)
          actionpack (= 4.1.9)
          actionview (= 4.1.9)
          activemodel (= 4.1.9)
          activerecord (= 4.1.9)
          activesupport (= 4.1.9)
          bundler (>= 1.3.0, < 2.0)
          railties (= 4.1.9)
          sprockets-rails (~> 2.0)
        railties (4.1.9)
          actionpack (= 4.1.9)
          activesupport (= 4.1.9)
          rake (>= 0.8.7)
          thor (>= 0.18.1, < 2.0)
        rake (10.4.2)
        rdoc (4.2.0)
        redis (3.2.1)
        redis-namespace (1.5.2)
          redis (~> 3.0, >= 3.0.4)
        ref (1.0.5)
        rest-client (1.6.8)
          mime-types (~> 1.16)
          rdoc (>= 2.4.2)
        rspec-core (3.2.3)
          rspec-support (~> 3.2.0)
        rspec-expectations (3.2.1)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.2.0)
        rspec-mocks (3.2.1)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.2.0)
        rspec-rails (3.2.1)
          actionpack (>= 3.0, < 4.3)
          activesupport (>= 3.0, < 4.3)
          railties (>= 3.0, < 4.3)
          rspec-core (~> 3.2.0)
          rspec-expectations (~> 3.2.0)
          rspec-mocks (~> 3.2.0)
          rspec-support (~> 3.2.0)
        rspec-support (3.2.2)
        ruby2ruby (2.1.3)
          ruby_parser (~> 3.1)
          sexp_processor (~> 4.0)
        ruby_parser (3.6.5)
          sexp_processor (~> 4.1)
        rufus-scheduler (3.0.9)
          tzinfo
        rvm-capistrano (1.5.6)
          capistrano (~> 2.15.4)
        safe_yaml (1.0.4)
        sass (3.2.19)
        sass-rails (4.0.4)
          railties (>= 4.0.0, < 5.0)
          sass (~> 3.2.2)
          sprockets (~> 2.8, < 2.12)
          sprockets-rails (~> 2.0)
        sexp_processor (4.5.0)
        sidekiq (3.3.3)
          celluloid (>= 0.16.0)
          connection_pool (>= 2.1.1)
          json
          redis (>= 3.0.6)
          redis-namespace (>= 1.3.1)
        sidekiq-cron (0.2.0)
          rufus-scheduler (>= 2.0.24)
          sidekiq (>= 2.17.3)
          tilt (< 2.0.0)
        simplecov (0.7.1)
          multi_json (~> 1.0)
          simplecov-html (~> 0.7.1)
        simplecov-html (0.7.1)
        sinatra (1.4.6)
          rack (~> 1.4)
          rack-protection (~> 1.4)
          tilt (>= 1.3, < 3)
        slop (3.6.0)
        spring (1.3.4)
        sprockets (2.11.3)
          hike (~> 1.2)
          multi_json (~> 1.0)
          rack (~> 1.0)
          tilt (~> 1.1, != 1.3.0)
        sprockets-rails (2.2.4)
          actionpack (>= 3.0)
          activesupport (>= 3.0)
          sprockets (>= 2.8, < 4.0)
        statsd-ruby (1.2.1)
        steps (1.1.3)
          colored (>= 1.2)
          highline (>= 1.6)
        sucker_punch (1.4.0)
          celluloid (~> 0.16.0)
        terminal-table (1.4.5)
        therubyracer (0.12.2)
          libv8 (~> 3.16.14.0)
          ref
        thor (0.18.1)
        thread_safe (0.3.5)
        tilt (1.4.1)
        timers (4.0.1)
          hitimes
        trebuchet (4.3.2)
          activesupport (> 3.2)
          buttress (> 2.0)
          capistrano (~> 2)
          capistrano-deploytags (~> 0.9.2)
          capistrano_colors (> 0.5)
          httpclient
          rvm-capistrano (> 1.5)
          safe_yaml (> 1.0)
          steps (> 1.1)
          thor (> 0.17)
        turbolinks (2.5.3)
          coffee-rails
        tzinfo (1.2.2)
          thread_safe (~> 0.1)
        uglifier (2.7.1)
          execjs (>= 0.3.0)
          json (>= 1.8.0)
        xml-simple (1.1.5)

    PLATFORMS
      ruby

    DEPENDENCIES
      aws-sdk
      brakeman
      buttress!
      jbuilder (~> 2.0)
      josephus (>= 0.3.0)!
      jquery-rails
      jruby-openssl
      plist
      pry
      puma
      rails (= 4.1.9)
      rspec-rails (>= 3.2.0)
      sass-rails (~> 4.0.3)
      sidekiq
      sidekiq-cron
      simplecov (~> 0.7.1)
      sinatra (>= 1.3.0)
      spring
      therubyracer
      therubyrhino
      trebuchet!
      turbolinks
      uglifier (>= 1.3.0)
herisanu commented 9 years ago

+1 here. didn't find the reason it happens. Also using bundler pack.

howethomas commented 9 years ago

+1 here. Mine's happening with bundle install

thomashowe:greenbot$ bundle env Environment

Bundler   1.9.7
Rubygems  2.4.6
Ruby      2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
GEM_HOME  /Users/thomashowe/.rvm/gems/ruby-2.2.0@kisst
GEM_PATH  /Users/thomashowe/.rvm/gems/ruby-2.2.0@kisst:/Users/thomashowe/.rvm/gems/ruby-2.2.0@global
RVM       1.26.11 (latest)
Git       2.3.2 (Apple Git-55)
rubygems-bundler (1.4.4)

Bundler settings

path
  Set for your local app (/Users/thomashowe/Documents/src/greenbot/.bundle/config): "vendor/cache"
disable_shared_gems
  Set for your local app (/Users/thomashowe/Documents/src/greenbot/.bundle/config): "1"
clean
  Set for your local app (/Users/thomashowe/Documents/src/greenbot/.bundle/config): "true"

Gemfile

source 'https://rubygems.org'

gem 'airbrake'
gem 'awesome_print'
gem 'bigdecimal'
gem 'builder'
gem 'bundler'
gem 'bundler-unload'
gem 'coderay'
gem 'eventmachine'
gem 'executable-hooks'
gem 'gem-wrappers'
gem 'gmail'
gem 'gmail_xoauth'
gem 'highline', ">=1.7.1"
gem 'io-console'
gem 'json'
gem 'mail'
gem 'method_source'
gem 'mime-types'
gem 'minitest'
gem 'multi_json'
gem 'nexmo'
gem 'oauth'
gem 'power_assert'
gem 'pry'
gem 'psych'
gem 'rake'
gem 'rdoc'
gem 'redis'
gem 'redis-semaphore'
gem 'rubygems-bundler'
gem 'rvm'
gem 'slop'
gem 'test-unit'
gem 'uuidtools'
gem 'parse-ruby-client'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    airbrake (4.2.1)
      builder
      multi_json
    awesome_print (1.6.1)
    bigdecimal (1.2.7)
    builder (3.2.2)
    bundler-unload (1.0.2)
    coderay (1.1.0)
    eventmachine (1.0.7)
    executable-hooks (1.3.2)
    faraday (0.9.1)
      multipart-post (>= 1.2, < 3)
    faraday_middleware (0.9.1)
      faraday (>= 0.7.4, < 0.10)
    gem-wrappers (1.2.7)
    gmail (0.5.0)
      gmail_xoauth (>= 0.3.0)
      mail (>= 2.2.1)
    gmail_xoauth (0.4.1)
      oauth (>= 0.3.6)
    highline (1.7.2)
    io-console (0.4.3)
    json (1.8.3)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    method_source (0.8.2)
    mime-types (2.6.1)
    minitest (5.7.0)
    multi_json (1.11.0)
    multipart-post (2.0.0)
    nexmo (3.0.0)
    oauth (0.4.7)
    parse-ruby-client (0.3.0)
      faraday
      faraday_middleware
    power_assert (0.2.3)
    pry (0.10.1)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    psych (2.0.13)
    rake (10.4.2)
    rdoc (4.2.0)
    redis (3.2.1)
    redis-semaphore (0.2.4)
      redis
    rubygems-bundler (1.4.4)
      bundler-unload (>= 1.0.2)
      executable-hooks (>= 1.3.2)
    rvm (1.11.3.9)
    slop (3.6.0)
    test-unit (3.1.2)
      power_assert
    uuidtools (2.1.5)

PLATFORMS
  ruby

DEPENDENCIES
  airbrake
  awesome_print
  bigdecimal
  builder
  bundler
  bundler-unload
  coderay
  eventmachine
  executable-hooks
  gem-wrappers
  gmail
  gmail_xoauth
  highline (>= 1.7.1)
  io-console
  json
  mail
  method_source
  mime-types
  minitest
  multi_json
  nexmo
  oauth
  parse-ruby-client
  power_assert
  pry
  psych
  rake
  rdoc
  redis
  redis-semaphore
  rubygems-bundler
  rvm
  slop
  test-unit
  uuidtools
francoisjacques commented 9 years ago

I have reproed this under ruby 2.1.6p336 with about any version of bundler from 1.8.9 and later (1.9-latest and 1.10-latest).

I don't know if it is present in earlier versions.

My minimal repro steps are

mkdir /tmp/bundler_repro

# I am using rbenv, plz adjust to your setup
echo "2.1.6" > /tmp/bundler_repro/.ruby-version

# This gem version matches exactly the version number of io-console
# in the ruby 2.1.6 builtin gemset. 
# Probably explains the presence of 'cached_built_in_gem' in the callstack.
echo "gem 'io-console', '= 0.4.3', :require => false" > /tmp/bundler_repro/Gemfile 

# boom
cd /tmp/bundler_repro && bundle package
============== #<Gem::Specification name=io-console version=0.4.3>
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?

  I ran the command `/home/sweethome/.rbenv/versions/2.1.6/bin/bundle package`

- What did you expect to happen?

  I expected Bundler to...

- What happened instead?

  Instead, what actually happened was...

Error details

    NoMethodError: undefined method `source_uri' for nil:NilClass
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/source/rubygems.rb:368:in `fetch_gem'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/source/rubygems.rb:171:in `cached_built_in_gem'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/source/rubygems.rb:153:in `cache'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/runtime.rb:113:in `block in cache'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/runtime.rb:110:in `cache'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/cli/package.rb:20:in `run'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/cli.rb:256:in `package'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/cli.rb:10:in `start'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/bin/bundle:20:in `block in <top (required)>'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
      /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bundler-1.9.10/bin/bundle:18:in `<top (required)>'
      /home/sweethome/.rbenv/versions/2.1.6/bin/bundle:23:in `load'
      /home/sweethome/.rbenv/versions/2.1.6/bin/bundle:23:in `<main>'

Environment

    Bundler   1.9.10
    Rubygems  2.2.3
    Ruby      2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
    GEM_HOME  /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0
    GEM_PATH  /home/sweethome/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0:/home/sweethome/.gem/ruby/2.1.0
    Git       2.4.5

Bundler settings

    build.pg
      Set for the current user (/home/sweethome/.bundle/config): "--with-pg-config=/usr/lib/postgresql/9.4/bin/pg_config"
    build.nokogiri
      Set for the current user (/home/sweethome/.bundle/config): "--use-system-libraries"
--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=undefined+method+%60source_uri%27+for+nil%3ANilClass&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new
lukaso commented 9 years ago

I have a hypothesis of what the problem is:

This failure occurs when a gem is included in the Gemfile that is already built into ruby. I was trying to work around gems that are no longer included in ruby 2.2 but bundling in ruby 2.1.6. For me it was test-unit. Does that sound right?

francoisjacques commented 9 years ago

Yup, it does. That was exactly the case for io-console

indirect commented 9 years ago

For now, a workaround is to add "source 'https://rubygems.org'" to your Gemfile.

On Wed, Jul 29, 2015 at 4:21 AM, François Jacques notifications@github.com wrote:

Yup, it does. That was exactly the case for io-console

Reply to this email directly or view it on GitHub: https://github.com/bundler/bundler/issues/3158#issuecomment-125922748

spjsschl commented 8 years ago

the workaround does not work for me, unless I use source 'https://rubygems.org' with a block

agis commented 8 years ago

Fixed by https://github.com/bundler/bundler/pull/3896.

francoisjacques commented 8 years ago

Awesome!