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.