'gem install' throws FloatDomainError when behind proxy (JRuby 1.6.0RC1 w/ RubyGems 1.4.2)

Nick's Avatar

Nick

15 Jan, 2011 02:46 AM

I've been looking all over for a solution for this, but all I've found are other people having the same problem:

All I can say for sure is that I have the problem with JRuby 1.6.0 RC1, with RubyGems 1.4.2. The StackOverflow question says he is having problems on Ubuntu with Ruby 1.8.7 (RVM I think). When I'm outside of my work's proxy server, I can download just fine.

An interesting stack trace makes me wonder whether it's the feature for showing the % completed on a download that is failing because the proxy is blocking or doing something funny with the request:

PS C:\mydocs> jruby -S gem update --debug
Exception 'LoadError' at org/jruby/RubyKernel.java:1041 - no such file to load -- openssl
Exception 'Gem::LoadError' at C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems.rb:812 - Could not find RubyGem jruby-openssl (>= 0)

Exception 'LoadError' at org/jruby/RubyKernel.java:1041 - no such file to load -- openssl
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Exception 'Gem::LoadError' at C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems.rb:812 - Could not find RubyGem jruby-openssl (>= 0)

Exception 'LoadError' at C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/x509.rb:8 - OpenSSL::X509 requires the jruby-openssl gem
Exception 'Gem::LoadError' at C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems.rb:812 - Could not find RubyGem test-unit (>= 0)

'Updating installed gems Updating arel
Fetching: arel-2.0.7.gemException 'FloatDomainError' at org/jruby/RubyFloat.java:797 - Infinity
ERROR: While executing gem ... (FloatDomainError)

Infinity
    org/jruby/RubyFloat.java:797:in 'ceil'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:461:in 'update'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:365:in 'request'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/protocol.rb:383:in 'call_block'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/protocol.rb:374:in '<<'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/protocol.rb:84:in 'read'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:2238:in 'read_chunked'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:2213:in 'read_body_0'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:2179:in 'read_body'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:362:in 'request'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:1054:in 'request'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:2142:in 'reading_body'
    C:/jruby-1.6.0.RC1/lib/ruby/1.8/net/http.rb:1053:in 'request'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:356:in 'request'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:298:in 'open_uri_or_path'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:307:in 'open_uri_or_path'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:181:in 'fetch_path'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:119:in 'download'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:264:in 'install'
    org/jruby/RubyArray.java:1671:in 'each'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in 'install'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:87:in 'execute'
    org/jruby/RubyArray.java:1671:in 'each'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:81:in 'execute'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in 'invoke'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134:in 'process_args'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in 'run'
    C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in 'run'
    C:/jruby-1.6.0.RC1/bin/gem:21:in '__file__'

Exception 'Gem::SystemExitException' at C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:310 - Exiting RubyGems with exit_code 1`

  1. Support Staff 1 Posted by Nick Quaranto on 18 Jan, 2011 03:56 AM

    Nick Quaranto's Avatar

    Not sure what's up here, bringing in Eric and Charlie on the scene. Any ideas?

  2. 2 Posted by Charles Oliver ... on 18 Jan, 2011 06:47 AM

    Charles Oliver Nutter's Avatar

    Anyone been able to reproduce this? I don't have a proxy handy right now. If it's happening in MRI I wouldn't expect it to be a JRuby issue, but I'm willing to help investigate.

  3. 3 Posted by Nick on 18 Jan, 2011 01:44 PM

    Nick's Avatar

    Here's some additional details. gem update on Ruby 1.9.2 (RubyGems 1.3.7) for Windows works.

    However,

    Ruby 1.8.7 with Rubygems 1.4.2:

    PS C:\Ruby187\bin> .\gem.bat env
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.4.1
      - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
      - INSTALLATION DIRECTORY: C:/Ruby187/lib/ruby/gems/1.8
      - RUBY EXECUTABLE: C:/Ruby187/bin/ruby.exe
      - EXECUTABLE DIRECTORY: C:/Ruby187/bin
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-mingw32
      - GEM PATHS:
         - C:/Ruby187/lib/ruby/gems/1.8
         - C:/mydocs/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "install" => "--env-shebang"
         - :sources => ["http://gems.rubyforge.org/"]
         - "update" => "--env-shebang"
      - REMOTE SOURCES:
         - http://gems.rubyforge.org/
    
    PS C:\Ruby187\bin> .\gem.bat install rails --debug
    Exception `NameError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:164 - uninitialized constant Gem::Commands::InstallCommand
    Exception `Gem::LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:812 - Could not find RubyGem test-unit (>= 0)
    
    Exception `Errno::EEXIST' at C:/Ruby187/lib/ruby/1.8/fileutils.rb:243 - File exists - C:/mydocs/.gem/specs/gems.rubyforge.org%80
    Exception `Errno::EEXIST' at C:/Ruby187/lib/ruby/1.8/fileutils.rb:243 - File exists - C:/mydocs/.gem/specs/gems.rubyforge.org%80
    Fetching: activesupport-3.0.3.gemException `FloatDomainError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:461 - Infinity
      Exception `FloatDomainError' at C:/Ruby187/lib/ruby/1.8/net/http.rb:1060 - Infinity
    ERROR:  While executing gem ... (FloatDomainError)
      Infinity
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:461:in `ceil'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb:461:in `update'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:360:in `request'
          C:/Ruby187/lib/ruby/1.8/net/protocol.rb:383:in `call_block'
          C:/Ruby187/lib/ruby/1.8/net/protocol.rb:374:in `<<'
          C:/Ruby187/lib/ruby/1.8/net/protocol.rb:84:in `read'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:2240:in `read_chunked'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:2215:in `read_body_0'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:2181:in `read_body'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:357:in `request'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:1054:in `request'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:2144:in `reading_body'
          C:/Ruby187/lib/ruby/1.8/net/http.rb:1053:in `request'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:351:in `request'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:293:in `open_uri_or_path'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:302:in `open_uri_or_path'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:176:in `fetch_path'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:114:in `download'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:264:in `install'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in `each'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in `install'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `execute'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `each'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134:in `process_args'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in `run'
          C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in `run'
          C:/Ruby187/bin/gem:21
      PS C:\Ruby187\bin>
    

    This is the same proxy, but with different platforms. The only thing I see different (and maybe I'm reading into it) is that my Rubygems version for the ones that aren't working are 1.4.x

  4. 4 Posted by roland.schmitt on 20 Jan, 2011 08:23 AM

    roland.schmitt's Avatar

    Hi,

    same here:

    c:\Documents and Settings\schmrol\Desktop>jruby -v
    jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java HotSpot(T
    M) Client VM 1.6.0_23) [Windows XP-x86-java]

    c:\Documents and Settings\schmrol\Desktop>jgem install rails
    JRuby limited openssl loaded. http://jruby.org/openssl
    gem install jruby-openssl for full support.
    Fetching: activesupport-3.0.3.gemERROR: While executing gem ... (FloatDomainErr
    or)

    Infinity
    

    Works with MRI ruby (1.9.2p136, gem version 1.3.7)

    Kind regards,
    Roland

  5. 5 Posted by Robert Elbourn on 20 Jan, 2011 02:53 PM

    Robert Elbourn's Avatar

    yup getting the same error as you guys same versions of ruby and gem too

  6. 6 Posted by Robert Elbourn on 20 Jan, 2011 03:08 PM

    Robert Elbourn's Avatar

    Installing 1.5.6 and its already got past that error, obviously as a release candidate (RC) it seems to have a few teething issues...

  7. Support Staff 7 Posted by Eric Hodel on 20 Jan, 2011 06:38 PM

    Eric Hodel's Avatar

    Likely due to a missing content-length header. This should be fixed in rubygems trunk, please verify.

  8. 8 Posted by Nick on 21 Jan, 2011 09:45 PM

    Nick's Avatar

    I installed the latest trunk version and verified that this works with

    • Cygwin Ruby 1.8.7
    • Ruby 1.8.7 (WinXP)
    • Ruby 1.9.2 (WinXP)
    • JRuby 1.6.0 RC1 (WinXP)

    So it appears to work for me across the board (on WinXP).

    Thank you!

  9. Support Staff 9 Posted by Nick Quaranto on 29 Jan, 2011 07:32 PM

    Nick Quaranto's Avatar

    Woo! Closing this out then.

  10. Nick Quaranto closed this discussion on 29 Jan, 2011 07:32 PM.

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

Keyboard shortcuts

Generic

? 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

Recent Discussions

30 Oct, 2014 04:34 PM
30 Oct, 2014 02:46 PM
28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM