Last Updated: February 25, 2016
· mativillagra

'sudo gem install ...' behind a proxy

  1. sudo visudo -f /etc/sudoers

  2. It turns out that you need to do some tweaking if you want sudo to carry your proxy environment across from the current user. To do this, run sudo visudo and add the env_keep line below:

Defaults envkeep += "httpproxy httpsproxy ftpproxy"

$ sudo env | grep httpproxy