Installing gems behind proxy servers

It is well documented as part of gem help that using the following common options:

-p, –[no-]http-proxy [URL]      Use HTTP proxy for remote operations

will allow gem to use the proxy server for remote operations. While this has worked for me before, but recently for some reason I have been getting errors. So, the other alternative that works for me is to set the environment variable HTTP_PROXY as such:

set HTTP_PROXY=http://[proxy url]:[port]

Actually this option is convenient. I have set the above environment variable permanently for the machines that I use at work which are behind proxy servers.

Technorati Tags: ,,

~ by Rupak Ganguly on March 17, 2008.

2 Responses to “Installing gems behind proxy servers”

  1. [...] você esteja tentando instalar um gem atrás de um proxy com autenticação, defina a variável de ambiente HTTP_PROXY com a url para o proxy da sua [...]

Leave a Reply

You must be logged in to post a comment.