Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1.1
    • Fix Version/s: JRuby 1.1.2
    • Component/s: Miscellaneous
    • Labels:
      None
    • Environment:
      Mac OS X 1.5.2, Java 1.5.0_13
    • Number of attachments :
      0

      Description

      I untar JRuby 1.1.1, and then the following happens when I attempt to list out of date gems:

      $ jruby -S gem outdated
      Bulk updating Gem source index for: http://gems.rubyforge.org/
      ERROR: While executing gem ... (Gem::RemoteSourceException)
      Error fetching remote gem cache: NameError: uninitialized constant Gem::RemoteFetcher::StringIO reading
      http://gems.rubyforge.org/yaml

      I get this same error when I try to do the following:

      $ jruby -S gem sources -a http://gems.github.com

      I've also tried this on Linux with Java 1.6, and I get the same error.

      If I open up jruby-1.1.1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb and add require 'stringio' to the top, it fixes the problem.

        Issue Links

          Activity

          Hide
          Caleb Land added a comment -

          After doing some research, I think this may be considered a bug in RubyGems. In MRI, yaml.rb requires stringio, but in JRuby, yaml.rb does not. If I compile jruby from source, and make yaml.rb require stringio, then everything works correctly.

          If the remote_fetcher.rb file directly requires stringio it should not rely on a non-RubyGems module to provide it transitively. I'll post a message to the rubygems mailing list.

          Show
          Caleb Land added a comment - After doing some research, I think this may be considered a bug in RubyGems. In MRI, yaml.rb requires stringio, but in JRuby, yaml.rb does not. If I compile jruby from source, and make yaml.rb require stringio, then everything works correctly. If the remote_fetcher.rb file directly requires stringio it should not rely on a non-RubyGems module to provide it transitively. I'll post a message to the rubygems mailing list.
          Hide
          Vladimir Sizikov added a comment -

          Thank you for the great bug report and investigation. Will fix.

          Show
          Vladimir Sizikov added a comment - Thank you for the great bug report and investigation. Will fix.
          Hide
          Vladimir Sizikov added a comment -

          Fixed in rev. r6598 on trunk, with suggested fix by Caleb Land. Thanks!

          Show
          Vladimir Sizikov added a comment - Fixed in rev. r6598 on trunk, with suggested fix by Caleb Land. Thanks!
          Hide
          Vladimir Sizikov added a comment -

          Ola has updated the yaml lib to match MRI behavior and to require 'stringio'. After such change, there is no need for us to monkey-path rubygems anymore.

          Show
          Vladimir Sizikov added a comment - Ola has updated the yaml lib to match MRI behavior and to require 'stringio'. After such change, there is no need for us to monkey-path rubygems anymore.

            People

            • Assignee:
              Vladimir Sizikov
              Reporter:
              Caleb Land
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: