Skip to content


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

ddd opened this Issue · 3 comments

2 participants

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.

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

For some reason, 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[] -= dupes
    @specs[] << s

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

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.

JRuby Team member

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


@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
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.