[Rubygems-developers] Missing require from rubygems/remote_fetcher.rb "stringio"

Caleb Land caleb.land at gmail.com
Tue Apr 29 23:13:57 EDT 2008

Running Jruby 1.1.1, I have the following problem (

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

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.

The remote_fetcher.rb file uses StringIO, but does not directly require
stringio. It works on MRI because someone else requires stringio for us, but
on JRuby this isn't happening. I think it might be yaml.rb, which doesn't
require stringio on JRuby but does on MRI.

If I recompile my jruby with a "require 'stringio'" in my yaml.rb, the
problem goes away.

What do you think?

Caleb Land
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rubygems-developers/attachments/20080429/d7a20c0e/attachment.html>

More information about the Rubygems-developers mailing list