Skip to content

Loading…

Bundler dying in #use method of Bundler::Index with undefined method 'each' for true:TrueClass #557

Closed
ddd opened this Issue · 3 comments

2 participants

@ddd
ddd commented

CROSS FILED: bundler/bundler#2358 [I don't know which this belongs to. Bundler or JRuby]

I'm getting the following error output while trying to bundle install.
Gist: https://gist.github.com/ddd/092e99c5a3f2e628c231

Note: Ignore the Warning!! line, its being thrown due to git'd gems being pulled in like Capybara.

For some reason, https://github.com/carlhuda/bundler/blob/master/lib/bundler/index.rb#L103 has the 'other' local var receiving a 'true' (true:TrueClass) which of course has no #each method.

def use(other, override_dupes = false)
  return unless other
  other.each do |s|  # OFFENDING LINE. 'other' is TrueClass, not an Array
    if (dupes = search_by_spec(s)) && dupes.any?
      next unless override_dupes
      @specs[s.name] -= dupes
    end
    @specs[s.name] << s
  end
  self
end

I can't seem to track where thats actually being set in the process without tearing into bundler deeper than i care to. I think its when it tries to walk the index of the remote specs. Thats at https://github.com/carlhuda/bundler/blob/master/lib/bundler/source/rubygems.rb#L234

api_fetchers.each { |f| idx.use f.specs(dependency_names, self) }

which, if I'm right, is right after bundler pulls from rubygems's exposed specs api, and walks it to find the gem in question for that iteration.

I'm using JRuby 1.7.3, and this is Bundler 1.3.1

ddd@cstg:~/www/cstg$ jruby --version
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.7.0_15-b20 [linux-amd64]
ddd@cstg:~/www/cstg$ bundle --version
Bundler version 1.3.1

POST NOTE: This has to be something to do with JRuby 1.7.3 and Bundler. I changed to MRI 1.9.3-p392 and it installed all gems with zero issues. Is this a misfiling? I'm going to cross file with JRuby.

@BanzaiMan
JRuby Team member

Can you test this again? I used checked with master (c7c3266) and Bundler 1.3.4, and it worked perfectly.

@ddd

@BanzaiMan I reported to @indirect that it was working with JRuby 1.7.3 and Bundler 1.3.5. I have no clue why it suddenly started working right, and I am still watching for it to reappear. I told indirect that if he wanted he could either keep the ticket against Bundler open or close it as Non-Reproducible. I say the same to you. It does work in Bundler 1.3.5 with JRuby 1.7.3

∵ jruby --version
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.7.0_15-b20 [linux-amd64]
∵ bundle --version
Bundler version 1.3.5
@BanzaiMan
JRuby Team member

Closing this for now. If we have a reliable test case, we'll open a new ticket and investigate.

@BanzaiMan BanzaiMan closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.