Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Installation Issues

Justin Ko edited this page Jun 27, 2013 · 1 revision

Installing from behind a proxy

If you are installing from behind a proxy, be sure to add the following to the end of any gem install or gem update command:

-p http://your-proxy-server-name:your-proxy-server-port

For example, if your proxy server was named proxy and it accepted connections on port 8000, your addition to the command line would be

-p http://proxy:8000

Read the gem install documentation for more information on specifying the proxy.

Installing from behind a firewall

Often behind a firewall you may find a normal command-line ruby install request not being able to access rubygems.

If you receive an error similar to "http://rubygems.org/ does not appear to be a repository" or an HTTP Response of 407, the following might help:

The following instructions involve setting the HTTP_PROXY environment variable and using the rubysspi library to use NTLM proxy authentication for Ruby on Windows:

  1. Set the %HTTP_PROXY% environment variable: SET HTTP_PROXY http://proxy.corp.com:8080
  2. Download rubysspi from the Ruby Win32 SSPI project page: http://rubyforge.org/projects/rubysspi/
  3. Install the rubysspi gem locally using the following command: gem install [local_path_to_gem]\rubysspi-1.2.3.gem
  4. Now copy the spa.rb file from the rubysspi gem install directory and paste it in the site-ruby directory. i.e. If ruby is installed in C:\ruby, then the destination path should be: C:\ruby\lib\ruby\site_ruby\spa.rb
  5. Run the gem script directly: ruby -rspa 'C:\ruby191\bin\gem' install watir

(The above is a shorter version of this: http://exceptionz.wordpress.com/2008/03/18/run-gem-install-behind-a-firewall-in-windows/