Installing ruby gems from behind proxy firewall

Generic Instructions

If you are trying to install/update a ruby gem from behind a proxy you should follow these instructions.

  1. Create a system environment variable named HTTP_PROXY containing the IP address of your proxy and the port number. The value should be something like:
    http://192.168.10.10:8080

    You should be able to find this information in your browser settings.

  2. Close and relaunch any command windows. Ruby gems should now work.

Specific Instructions for Windows users

On Windows you can view/edit/create system environment variables by right clicking My Computer and selecting Properties. Select the Advanced tab and then click Environment Variables. Click New under System Variables and enter HTTP_PROXY as the name and your IP address and port as the value.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 13, 2010

    Robert Papesch says:

    Many potential users are probably put off by the weird install steps for Watir. ...

    Many potential users are probably put off by the weird install steps for Watir. Having to figure out proxies, update gems, install gems, resolve dependencies etc is a complete pain. When the proxy cannot be identified, ie, there is a PAC script, or proxy information is hidden by the system admin, it just does not work. Watir developers should build a nice Windows MSI that contains the dependencies, for each (major) release. Don't make life hard for your users!

    I'm still trying to figure out how to get Watir installed without knowing the proxy URL. The options involve some obsolete "standalone" installer, or more technical tedium such as devkit, or someone's "portable ruby on rails (PRoR)", or getting the gems individually from rubygems.org (and then figuring out the multitude of dependencies). Watir is great but the  install is just not worth the hassle. Look on Google for how many others have this problem. Thousands I suspect.