I am behind a corporate proxy and it needs authorization to use it. When I try just to use option -p http://ip.of.my.proxy:3128
, it throws error 407. Is there a workaround?
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
What does gem install do? gem install , in its simplest form, does something kind of like this. It grabs the gem and puts its files into a special directory on your system. You can see where gem install will install your gems if you run gem environment (look for the INSTALLATION DIRECTORY: line):
this solution works for me in analog situation (corporate network behind autenticated proxy):
http_proxy: http://<YOUR_USER>:<YOUR_PASSWORD>@<YOUR_PROXY_HOST>:<YOUR_PROXY_PORT>
This is the way I figured it out. Hope it works for you too.
sudo -i gem install GEM_NAME
Note that the authorizationi.e username and password need to be filled in the proxy settings for the system.
If you are not the root user, or you wish to install the gem locally (if using RVM), don't use sudo then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With