title: Install Ruby gems behind NTLM proxy
body: <p>I am trying to install ruby gems behind NTLM proxy. My OS is Windows 7. These are all the solutions that I tried, non of them working.</p>
  
  <p><strong>Using HTTP_PROXY:</strong></p>
  
  <pre><code>set HTTP_PROXY=http://domain\user:pass@proxy.company.com:8080
  set HTTP_PROXY=http://domain\\user:pass@proxy.company.com:8080
  set HTTP_PROXY=http://domain\\user:pass@proxy.company.com:8080/
  </code></pre>
  
  <p>All above response bad URI</p>
  
  <pre><code>set HTTP_PROXY=http://user:pass@proxy.company.com:8080
  </code></pre>
  
  <p>Response: bad response Proxy Authentication Required 407</p>
  
  <p><strong>Using -p or --http-proxy parameter from Ruby</strong></p>
  
  <pre><code>gem install -p "http://domain\user:pass@proxy.company.com:8080" rake
  
  gem install -p "http://domain\\user:pass@proxy.company.com:8080" rake
  
  gem install -p http://domain\user:pass@proxy.company.com:8080 rake
  
  gem install -p http://domain\\user:pass@proxy.company.com:8080 rake
  
  gem install --http-proxy "http://domain\user:pass@proxy.company.com:8080" rake
  
  gem install --http-proxy "http://domain\\user:pass@proxy.company.com:8080" rake
  
  gem install --http-proxy http://domain\user:pass@proxy.company.com:8080 rake
  
  gem install --http-proxy http://domain\\user:pass@proxy.company.com:8080 rake
  </code></pre>
  
  <p>All response: invalid argument</p>
  
  <pre><code>Try all the options above without the domain or encode the \ to %5C will receive reponse: bad response Proxy Authentication Required 407
  </code></pre>
  
  <p>What did I miss in these command or setup?</p>