Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundler error #5797

Closed
jhavero opened this issue Jun 20, 2017 · 19 comments · Fixed by #5819
Closed

bundler error #5797

jhavero opened this issue Jun 20, 2017 · 19 comments · Fixed by #5819
Assignees

Comments

@jhavero
Copy link

jhavero commented Jun 20, 2017

Running bundler
--- ERROR REPORT TEMPLATE -------------------------------------------------------

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command /var/lib/jenkins/.rvm/gems/ruby-2.3.3/bin/bundle install --quiet

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what happened was...

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    I tried...

  • Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?

    ...

Backtrace

NoMethodError: undefined method `type' for ["ruby-ajp", ">= 0.2.0"]:Array
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:121:in `block (2 levels) in dependency_names'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:120:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:120:in `block in dependency_names'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:105:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:105:in `block in each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:104:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:104:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:119:in `dependency_names'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:377:in `block (3 levels) in remote_specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:375:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:375:in `block (2 levels) in remote_specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:373:in `loop'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:373:in `block in remote_specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:10:in `build'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:345:in `remote_specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:82:in `specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:263:in `block (2 levels) in index'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:261:in `each'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:261:in `block in index'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/index.rb:10:in `build'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:258:in `index'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:252:in `resolve'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:176:in `specs'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/definition.rb:164:in `resolve_remotely!'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/installer.rb:226:in `resolve_if_need'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/installer.rb:78:in `run'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/installer.rb:24:in `install'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/cli/install.rb:70:in `run'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/cli.rb:181:in `block in install'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/settings.rb:99:in `temporary'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/cli.rb:180:in `install'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/bin/bundle:22:in `load'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/bin/bundle:22:in `<main>'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
  /var/lib/jenkins/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'

Environment

Bundler   1.14.6
Rubygems  2.6.10
Ruby      2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
GEM_HOME  /var/lib/jenkins/.rvm/gems/ruby-2.3.3
GEM_PATH  /var/lib/jenkins/.rvm/gems/ruby-2.3.3:/var/lib/jenkins/.rvm/gems/ruby-2.3.3@global
RVM       1.29.1 (latest)
Git       2.11.0
Platform  x86_64-linux
OpenSSL   OpenSSL 1.0.1 14 Mar 2012

Bundler settings

bin
  Set for the current user (/var/lib/jenkins/.bundle/config): "bin"

--- TEMPLATE END ----------------------------------------------------------------

@jhavero
Copy link
Author

jhavero commented Jun 20, 2017

What did you do?
bundle install --quiet

Problem is intermittent.

@jhavero
Copy link
Author

jhavero commented Jun 20, 2017

Here is output of 'bundle env'

$ bundle env

Environment

Bundler   1.14.6
Rubygems  2.6.10
Ruby      2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
GEM_HOME  /var/lib/jenkins/.rvm/gems/ruby-2.3.3
GEM_PATH  /var/lib/jenkins/.rvm/gems/ruby-2.3.3:/var/lib/jenkins/.rvm/gems/ruby-2.3.3@global
RVM       1.29.1 (latest)
Git       2.8.2
Platform  x86_64-linux

Bundler settings

bin
  Set for the current user (/var/lib/jenkins/.bundle/config): "bin"

Gemfile

Gemfile

source 'https://artifactory.XXXXX.com/artifactory/api/gems/rubygems-remote/'
source 'https://rubygems.org'

gem 'aws-sdk', '~>2.6.33'
gem 'json'
gem 'slack-ruby-client', '~>0.7.7'
gem 'sparkle_formation', '0.3.0'
gem 'random-word', '~>1.3.0'
gem 'json-schema', '~>2.6.2'
gem 'octokit', '~>4.6.0'
gem 'jenkins_api_client', '~>1.4.5'
gem 'berkshelf', '5.6.3'
gem 'splunk-sdk-ruby'
gem 'mixlib-cli'

Gemfile.lock

GEM
  remote: https://artifactory.XXXXX.com/artifactory/api/gems/rubygems-remote/
  remote: https://rubygems.org/
  specs:
    activesupport (5.1.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.3.8)
    attribute_struct (0.2.28)
      bogo (>= 0.1.31, < 0.3.0)
    aws-sdk (2.6.50)
      aws-sdk-resources (= 2.6.50)
    aws-sdk-core (2.6.50)
      aws-sigv4 (~> 1.0)
      jmespath (~> 1.0)
    aws-sdk-resources (2.6.50)
      aws-sdk-core (= 2.6.50)
    aws-sigv4 (1.0.0)
    berkshelf (5.6.3)
      addressable (~> 2.3, >= 2.3.4)
      berkshelf-api-client (>= 2.0.2, < 4.0)
      buff-config (~> 2.0)
      buff-extensions (~> 2.0)
      buff-shell_out (~> 1.0)
      cleanroom (~> 1.0)
      faraday (~> 0.9)
      httpclient (~> 2.7)
      minitar (~> 0.5, >= 0.5.4)
      mixlib-archive (~> 0.4)
      octokit (~> 4.0)
      retryable (~> 2.0)
      ridley (~> 5.0)
      solve (> 2.0, < 4.0)
      thor (~> 0.19, < 0.19.2)
    berkshelf-api-client (3.0.0)
      faraday (~> 0.9)
      httpclient (~> 2.7)
      ridley (>= 4.5, < 6.0)
    bogo (0.2.10)
      hashie
      multi_json
    buff-config (2.0.0)
      buff-extensions (~> 2.0)
      varia_model (~> 0.6)
    buff-extensions (2.0.0)
    buff-ignore (1.2.0)
    buff-ruby_engine (1.0.0)
    buff-shell_out (1.1.0)
      buff-ruby_engine (~> 1.0)
    celluloid (0.16.0)
      timers (~> 4.0.0)
    celluloid-io (0.16.2)
      celluloid (>= 0.16.0)
      nio4r (>= 1.1.0)
    chef-config (13.1.31)
      addressable
      fuzzyurl
      mixlib-config (~> 2.0)
      mixlib-shellout (~> 2.0)
    cleanroom (1.0.0)
    concurrent-ruby (1.0.5)
    erubis (2.7.0)
    faraday (0.12.1)
      multipart-post (>= 1.2, < 3)
    faraday_middleware (0.11.0.1)
      faraday (>= 0.7.4, < 1.0)
    fuzzyurl (0.9.0)
    gli (2.16.0)
    hashie (3.5.5)
    hitimes (1.2.5)
    httpclient (2.8.3)
    i18n (0.8.4)
    jenkins_api_client (1.4.5)
      json (~> 1.0)
      mixlib-shellout (>= 1.1.0)
      nokogiri (~> 1.6.0)
      socksify (>= 1.7.0)
      terminal-table (>= 1.4.0)
      thor (>= 0.16.0)
    jmespath (1.3.1)
    json (1.8.6)
    json-schema (2.6.2)
      addressable (~> 2.3.8)
    mini_portile2 (2.1.0)
    minitar (0.6.1)
    minitest (5.10.2)
    mixlib-archive (0.4.1)
      mixlib-log
    mixlib-authentication (1.4.1)
      mixlib-log
    mixlib-cli (1.7.0)
    mixlib-config (2.2.4)
    mixlib-log (1.7.1)
    mixlib-shellout (2.2.7)
    molinillo (0.5.7)
    multi_json (1.12.1)
    multipart-post (2.0.0)
    nio4r (2.1.0)
    nokogiri (1.6.8.1)
      mini_portile2 (~> 2.1.0)
    octokit (4.6.2)
      sawyer (~> 0.8.0, >= 0.5.3)
    random-word (1.3.0)
    retryable (2.0.4)
    ridley (5.1.1)
      addressable
      buff-config (~> 2.0)
      buff-extensions (~> 2.0)
      buff-ignore (~> 1.2)
      buff-shell_out (~> 1.0)
      celluloid (~> 0.16.0)
      celluloid-io (~> 0.16.1)
      chef-config (>= 12.5.0)
      erubis
      faraday (~> 0.9)
      hashie (>= 2.0.2, < 4.0.0)
      httpclient (~> 2.7)
      json (>= 1.7.7)
      mixlib-authentication (>= 1.3.0)
      retryable (~> 2.0)
      semverse (~> 2.0)
      varia_model (~> 0.6)
    sawyer (0.8.1)
      addressable (>= 2.3.5, < 2.6)
      faraday (~> 0.8, < 1.0)
    semverse (2.0.0)
    slack-ruby-client (0.7.9)
      activesupport
      faraday (>= 0.9)
      faraday_middleware
      gli
      hashie
      json
      websocket-driver
    socksify (1.7.1)
    solve (3.1.0)
      molinillo (>= 0.5)
      semverse (>= 1.1, < 3.0)
    sparkle_formation (0.3.0)
      attribute_struct (~> 0.2.2)
      multi_json
    splunk-sdk-ruby (1.0.5)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thor (0.19.1)
    thread_safe (0.3.6)
    timers (4.0.4)
      hitimes
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    unicode-display_width (1.3.0)
    varia_model (0.6.0)
      buff-extensions (~> 2.0)
      hashie (>= 2.0.2, < 4.0.0)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)

PLATFORMS
  ruby

DEPENDENCIES
  aws-sdk (~> 2.6.33)
  berkshelf (= 5.6.3)
  jenkins_api_client (~> 1.4.5)
  json
  json-schema (~> 2.6.2)
  mixlib-cli
  octokit (~> 4.6.0)
  random-word (~> 1.3.0)
  slack-ruby-client (~> 0.7.7)
  sparkle_formation (= 0.3.0)
  splunk-sdk-ruby

BUNDLED WITH
   1.14.6

@segiddins
Copy link
Member

I'm unable to reproduce -- when I attempt to install the given gemfile, I get the following:

Bundler::HTTPError: Network error while fetching https://artifactory.XXXXX.com/artifactory/api/gems/rubygems-remote/versions (execution expired)

@jhavero
Copy link
Author

jhavero commented Jun 20, 2017

that's my organization's artifactory repo which I've blocked out for privacy.

@segiddins
Copy link
Member

Can you please share a gemfile we can use to reproduce the error? Otherwise it's unlikely we'll be able to figure out what's going wrong

@bmorton
Copy link

bmorton commented Jun 26, 2017

Happens for us here too at Yammer, but we also have an internal geminabox server that you won't be able to access. Anything we can do to help you troubleshoot it otherwise? We see it sporadically. We'll run bundler once and it'll fail and then run it again the exact same way and it'll work.

@bmorton
Copy link

bmorton commented Jun 26, 2017

Looks like this same gem comes up in a few different issues when looking back at past issues: https://github.com/bundler/bundler/issues?utf8=✓&q=ruby-ajp

@indirect mentioned this in an old comment to something similar: "This seems to be an error that only surfaces when some (but not all) of the requests to rubygems.org fail. They're currently having load balancer issues that intermittently return 500 errors."

Could that be happening here?

@colby-swandale
Copy link
Member

@bmorton can you please share the output of bundle env

@bmorton
Copy link

bmorton commented Jun 26, 2017

Doing some more investigation, I'd love to confirm if that fallback to pulling all the gemspecs is happening again. If that does happen, then it looks like the gemspec for ajp-rails is problematic in some way:

$ bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 1.14.6
NoMethodError: undefined method `runtime?' for ["ruby-ajp", ">= 0.2.0"]:Array
An error occurred while installing ajp-rails (0.0.0), and Bundler cannot continue.
Make sure that `gem install ajp-rails -v '0.0.0'` succeeds before bundling.

Using this Gemfile:

source 'https://rubygems.org'

gem "ajp-rails", "0.0.0"

#2615 mentions this file: http://aws-eu-cache01.rubygems.org/quick/Marshal.4.8/ajp-rails-0.0.0.gemspec.rz

@bmorton
Copy link

bmorton commented Jun 26, 2017

@colby-swandale, I can but our security team will probably require that I redact some things in it and we have an internal gemserver that you won't be able to access. Is it still helpful without that stuff?

@bmorton
Copy link

bmorton commented Jun 26, 2017

Also, I've added --verbose to our bundle install command and it isn't happening after I've added that ;/

@bmorton
Copy link

bmorton commented Jun 26, 2017

I've gotten it to trigger now with verbose. I am going to talk to our security team to see if I can send you the whole verbose log, but here are the relevant bits for us at least. We end up getting rate limited (probably because of how our outbound egress is routed and the number of webs that we deploy to at a time?)

Once we get rate limited, bundler starts pulling back every gemspec, but these requests don't seem to be rate limited. Once it gets to a gemspec that's bad, the whole thing crashes.

Fetching version metadata from https://rubygems.org/
HTTP GET https://index.rubygems.org/api/v1/dependencies
HTTP 429 Too Many Requests https://index.rubygems.org/api/v1/dependencies
...
HTTP GET https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.3.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.3.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.1.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.1.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.2.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/simple_api_client-0.0.2.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.3.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.3.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-3.2.0.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-3.2.0.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.0.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.0.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.1.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.1.1.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.3.3.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.3.3.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.0.0.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.0.0.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.2.2.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.2.2.gemspec.rz
HTTP GET https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.0.0.rc4.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/sprockets-rails-2.0.0.rc4.gemspec.rz
...
HTTP GET https://rubygems.org/quick/Marshal.4.8/ajp-rails-0.0.0.gemspec.rz
HTTP 200 OK https://rubygems.org/quick/Marshal.4.8/ajp-rails-0.0.0.gemspec.rz
--- ERROR REPORT TEMPLATE -------------------------------------------------------

- What did you do?
  I ran the command `/home/[REDACTED]/.gem/ruby/2.1.9/bin/bundle install --verbose --deployment --path /opt/[REDACTED]/shared/bundle --gemfile /opt/[REDACTED]/releases/20170626214501/Gemfile --without development test xunit`

- What did you expect to happen?
  I expected Bundler to...

- What happened instead?
  Instead, what happened was...

Error details
    NoMethodError: undefined method `name' for ["ruby-ajp", ">= 0.2.0"]:Array
...

@segiddins
Copy link
Member

This looks like it might be a bug with rubygems.org, as it's serving an invalid gemspec for https://rubygems.org/gems/ajp-rails/versions/0.0.0. The only thing Bundler can do here is to error out more gracefully, but I recommend opening up an issue on rg.org for the invalid gem spec.

@segiddins
Copy link
Member

See #5819

@bmorton
Copy link

bmorton commented Jun 27, 2017

Cool, thanks. I'll open an issue with them.

As for Bundler, is it expected behavior that when Bundler gets rate limited with a 429, it instead rapidly makes ~33k requests for every version of every gem?

@indirect
Copy link
Member

@bmorton it's a known edge case bug that we have had trouble easily or consistently reproducing in tests, but that we would like to fix. Hopefully the information from this ticket will help!

@bmorton
Copy link

bmorton commented Jun 27, 2017

Sweet. I can actually reproduce this locally with a proxy now that injects 429s at the right place. Is that helpful to post how I did that here?

@indirect
Copy link
Member

The trick is reproducing it inside a test in our test suite, but if you could gist a writeup of your repro steps, that would probably be helpful. Thanks!

@bmorton
Copy link

bmorton commented Jun 27, 2017

Here are the steps. Its a bit tricky to repro, but this should lay it out pretty well. Basically its a mix of getting the 429 at the right time and using an additional geminabox source.

https://github.com/bmorton/rubygems-rate-limiter

Let me know if you need help getting this working. I ran it through with a coworker (thanks @matthewshafer!) real quick and it seemed to work (as long as you have golang setup already).

I think we'll have a stab at trying to get a test case going for this later, but are gonna leave it alone for a little bit.

bundlerbot added a commit that referenced this issue Jul 5, 2017
[RemoteSpecification] Fail gracefully when deps is an array of array of string

Instead of containing Gem::Dependency objects

### What was the end-user problem that led to this PR?

The problem was some gems have invalid gemspecs served by RubyGems.org. See #5797.

### Was was your diagnosis of the problem?

My diagnosis was (very old) some gemspecs can have `s.dependencies = [["name", "req"]]` instead of `s.dependencies = [Gem::Dependency.new("name", "req")]`.

### What is your fix for the problem, implemented in this PR?

My fix coerces the invalid dependencies to an array of dependency objects so we can fail more gracefully during installation, without spitting out the error template.

Closes #5797.

### Why did you choose this fix out of the possible options?

I chose this fix because it allows resolution to finish, and falls back upon existing error messages.
segiddins pushed a commit that referenced this issue Jul 17, 2017
[RemoteSpecification] Fail gracefully when deps is an array of array of string

Instead of containing Gem::Dependency objects

### What was the end-user problem that led to this PR?

The problem was some gems have invalid gemspecs served by RubyGems.org. See #5797.

### Was was your diagnosis of the problem?

My diagnosis was (very old) some gemspecs can have `s.dependencies = [["name", "req"]]` instead of `s.dependencies = [Gem::Dependency.new("name", "req")]`.

### What is your fix for the problem, implemented in this PR?

My fix coerces the invalid dependencies to an array of dependency objects so we can fail more gracefully during installation, without spitting out the error template.

Closes #5797.

### Why did you choose this fix out of the possible options?

I chose this fix because it allows resolution to finish, and falls back upon existing error messages.

(cherry picked from commit 5c62240)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants