Install Watir

For up to date installation instructions, download free version of Watir book, or go directly to the page for your operating system: Windows, Mac, Ubuntu Linux.

Install Watir

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/

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 22, 2009

    Robert Papesch says:

    If your browser connects to the web via a PAC script, the host/port can be found...

    If your browser connects to the web via a PAC script, the host/port can be found within the script source code. A website URL is specified under "Automatic proxy configuration URL" (FF) or "Automatic configuration script" (IE) in the browser network settings. Navigate to that URL and "view source" -- proxy names/ports will be specified within the script.

  2. Mar 31, 2009

    Jared Quinert says:

    This got me through the gem firewall issues: http://exceptionz.wordpress.com/20...
  3. Aug 25

    inoopy says:

    On Gentoo, if running 'gem install watir-webdriver' you get an error like: ERR...

    On Gentoo,

    if running 'gem install watir-webdriver' you get an error like:

    ERROR: Error installing watir-webdriver: ERROR: Failed to build gem native extension.

    and make returns 'error 1' due to [ffi_c.so].

    Add 'threads' to your useflags, than:

    - emerge   dev-ruby/ffi

    - rerun : gem install watir-webdriver.

    This will fix it!