This post is older than a year. Consider some information might not be accurate anymore.
How to install the ruby bundler behind a proxy with sudo.
To use ruby bundler behind a proxy, define the proxy host in env variables
export http_proxy=http://10.0.2.2:3128 export https_proxy=https://10.0.2.2:3128
However if you need to sudo, because you have no write permission on the ruby gems folder, sudo does not preserve the
http_proxy env variable. Therefore add following line in
Defaults env_keep = "http_proxy ftp_proxy"
before this line:
After this you can install the bundler gem.
tan@omega:~/sources/my-awesome-site$ sudo gem install bundler Fetching: bundler-1.14.6.gem (100%) Successfully installed bundler-1.14.6 Parsing documentation for bundler-1.14.6 Installing ri documentation for bundler-1.14.6 Done installing documentation for bundler after 4 seconds 1 gem installed