Windows/JRuby gem install fails most of the time!

Brandon Hauff's Avatar

Brandon Hauff

29 Mar, 2010 07:48 PM


When installing gems in Windows with jruby the majority of the time I get the following error:

C:\data\BrandonH\Dev>jruby -S gem install arel
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SystemCallError: Unknown error - An established connection was aborted by the software in your host machine (

When doing a gem install in Windows in MRI I have no problems. This problems seemed to start in the last month or two after no changes on my local machine. It makes no difference rather I am using jruby 1.4.0 or the master branch. I have rubygems 1.3.6 installed in both.

  1. Support Staff 1 Posted by Nick Quaranto on 30 Mar, 2010 01:47 PM

    Nick Quaranto's Avatar

    Can you run gem install [some gem] -V ? The --debug flag output will help us out too.

    Also, are you behind any kind of firewall or NAT? We've heard of some issues with that.

  2. 2 Posted by Brandon Hauff on 30 Mar, 2010 06:49 PM

    Brandon Hauff's Avatar


    I am not behind a firewall or NAT. This same command works fine in MRI, and only just recently broke in JRuby.

    Here is the output with -V and --debug

  3. Support Staff 3 Posted by Eric Hodel on 30 Mar, 2010 08:20 PM

    Eric Hodel's Avatar

    Sounds like jruby is not mapping this exception to Errno::ECONNABORTED, from rubygems/remote_fetcher:

    # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible
    # to install gems.
  4. 4 Posted by Brandon Hauff on 31 Mar, 2010 01:33 PM

    Brandon Hauff's Avatar

    drbrain or Nick,

    Why would this error just start recently w/ no changes to jruby? Where there changes to rubygems recently? I can report this to the jruby team, but they might need more information on how to go forward.


    Brandon Hauff

  5. 5 Posted by Tom Enebo on 31 Mar, 2010 07:05 PM

    Tom Enebo's Avatar

    Fixed in commit 6e8d0d5 in JRuby.

    The base issue here was that IO.sysread was returning a generic unknown Errno Exception instead of ECONNABORTED errno. drbrain nailed it.

  6. Support Staff 6 Posted by Eric Hodel on 31 Mar, 2010 09:22 PM

    Eric Hodel's Avatar

    Thanks Tom!

    Brandon: The behavior I'd heard of about Errno::ECONNABORTED is that it just happens sometimes because that's how Windows built their TCP/IP stack. Maybe the connection between you and is more congested, or some TCP timeout was tripped.

  7. Eric Hodel closed this discussion on 31 Mar, 2010 09:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac