title: RubyGems behind a proxy: InvalidArgument
body: <p>The other question (here: ) had solutions that I tried but they didn't work.</p>
  
  <p>I am behind a proxy at work, and can't figure out how to get RubyGems to work through it.</p>
  
  <p>Here's some output to help:</p>
  
  <pre><code>josiah@BOX-OF-DOOOM:/etc$ export HTTP_PROXY=http://jkiehl:supersecret@www-proxy.myproxysdomain.com:80/
  josiah@BOX-OF-DOOOM:/etc$ sudo gem i cucumber
  ERROR:  http://rubygems.org/ does not appear to be a repository
  ERROR:  Could not find a valid gem 'cucumber' (&gt;= 0) in any repository
  josiah@BOX-OF-DOOOM:/etc$ sudo gem i -p cucumber
  ERROR:  While executing gem ... (OptionParser::InvalidArgument)
      invalid argument: -p cucumber
  josiah@BOX-OF-DOOOM:/etc$ sudo gem i -P cucumber
  ERROR:  While executing gem ... (OptionParser::InvalidArgument)
      invalid argument: -P 
  josiah@BOX-OF-DOOOM:/etc$ sudo gem i --http-proxy cucumber
  ERROR:  While executing gem ... (OptionParser::InvalidArgument)
  </code></pre>
  
  <p>Any ideas?  I'm baffled.</p>