Reputation: 117
I am using ubuntu 12.04. I am trying to run
bundle install
behind the proxy network of my institute.I have correctly setup the apt.conf file and all other downloads from terminal are working fine. I added the following to ~/.bashrc
export HTTP_PROXY=http://user:password@proxy_url:port
alias curl="curl -x http://proxy_url:port/ -U user:password"
alias rvm="rvm --proxy http://user:password@proxy_url:port"
And i added the following to my environment file:
http_proxy="http://user:password@proxy_url:port/"
https_proxy="https://user:password@proxy_url:port/"
ftp_proxy="ftp://user:password@proxy_url:port/"
socks_proxy="socks://user:password@proxy_url:port/"
I also added the following to ~/.gemrc:
http-proxy:http://user:password@proxy_url:port
After making all these changes when i run the bundler using with or without sudo on the terminal i get back the source code of some html page.The code of html page is followed by the line:
Net::HTTPProxyAuthenticationRequired:
Please tell me what to do to make rails run behind the proxy.
Upvotes: 0
Views: 5286
Reputation: 671
This isn't a Rails question per-se, it's a Bundler question.
I would try the following on the command line (either should work):
export HTTP_PROXY=http://user:password@proxy_url:port
export http_proxy=http://user:password@proxy_url:port
Potentially your ~/.bashrc
file isn't being executed on login/etc.
I would also change the ~/.gemrc
file to: http_proxy=http://user:password@proxy_url:port
Check out the source code in Bundler for any extra information you may need.
Upvotes: 1