title: gem install returns FloatDomainError Infinity or NaN
body: <p>On Ubuntu 10.10, I cannot install any gems!</p>
  
  <pre><code>$ sudo gem install rails
  ERROR:  http://rubygems.org/ does not appear to be a repository
  ERROR:  Could not find a valid gem 'rails' (&gt;= 0) in any repository
  ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
      too many connection resets (http://rubygems.org/latest_specs.4.8.gz)
  </code></pre>
  
  <p>Ok, so the proxy is in the way :-</p>
  
  <pre><code>$ sudo gem install -p http://username:password@the.proxy.com:8080 rails 
  ERROR:  While executing gem ... (FloatDomainError)
      NaN
  Fetching: activesupport-3.0.3.gem(1)
  </code></pre>
  
  <p><em>1) This is where it returned the cursor to, not a new line?! It does this on every call below as well.</em></p>
  
  <p>Get the same with another gem :-</p>
  
  <pre><code>$ sudo gem install --http-proxy=http://username:password@proxy:8080 twitter
  ERROR:  While executing gem ... (FloatDomainError)
      NaN
  Fetching: hashie-0.4.0.gem
  </code></pre>
  
  <p><em>I have tried -p as well!</em></p>
  
  <p>But my<code>http_proxy</code>env var is setup correctly :-</p>
  
  <pre><code>$ env | grep http
  http_proxy=http://username:password@proxy.com:8080
  </code></pre>
  
  <p>As stuff like this works :-</p>
  
  <pre><code>$ gem list -r rails
  
  *** REMOTE GEMS ***
  
  rails (3.0.3)
  rails-action-args (0.1.1)
  rails-admin (0.0.0)
  rails-app-installer (0.2.0)
  rails-app-spec (0.3.2)
  ...
  </code></pre>
  
  <p><em>And all the<code>apt-get</code>&amp;<code>curl</code>commands go straight though without problems.</em></p>
  
  <p>Versions :-</p>
  
  <pre><code>$ ruby -v
  ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
  
  $ which ruby
  /usr/bin/ruby
  $ whereis ruby
  ruby: /usr/bin/ruby1.8 /usr/bin/ruby /usr/lib/ruby /usr/share/man/man1/ruby.1.gz
  
  $ rvm list
  
  rvm rubies
  
     ree-1.8.7-2010.02 [ i386 ]
     ruby-1.9.2-p136 [ i386 ]
  
  $ rvm -v
  rvm 1.2.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
  
  $ gem -v
  1.4.2
  
  $ which gem
  /usr/bin/gem
  $ whereis gem
  gem: /usr/bin/gem /usr/bin/gem1.8 /usr/share/man/man1/gem.1.gz
  </code></pre>
  
  <p>Any help/ideas?</p>