Installation

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.

Troubleshooting

Visit the following links for having trouble with installation:

Installing Behind an Authenticating Proxy

Watir drivers are packaged as gems, Ruby libraries that can be installed over the internet. If installing behind an authenticating proxy, first set the HTTP_PROXY environment variable:

Windows:

set HTTP_PROXY=http://username:password@your.proxy.com:80

Linux:

export http_proxy=http://username:password@your.proxy.com:80

Tips

Install Ruby on Linux

Use your relevant package manager to update or install Ruby with the following at a terminal window:

sudo apt-get install ruby  # for Ubuntu / Debian users
sudo yum install ruby      # for Red Hat / Fedora users

Update RubyGems on Linux

Make sure you have the latest rubygems version 1.3.7 or above installed. Use your relevant package manager to install the latest version with the following at a terminal window:

sudo apt-get install rubygems # for Ubuntu / Debian users
sudo yum install rubygems  # for Red Hat / Fedora users

Install a HTML Inspector

To use Watir effectively, you’ll need to be able to browse through the structure of your application’s HTML pages. These tools help you do that.

Installing or Updating RubyGems

While updating RubyGems, or installing any of the gems, you can use the following additional flags:

--no-rdoc --no-ri

For example:

gem update --system --no-rdoc --no-ri
gem install watir --no-rdoc --no-ri

It will be much faster, but you will not install RDoc and ri.

One thought on “Installation

  1. Very good instructions. The Ubuntu setup went well. There’s this great article about setting up opera using apt-get which was helpful.

    http://www.liberiangeek.net/2011/12/install-opera-web-browser-using-apt-get-in-ubuntu-11-10-oneiric-ocelot/

    Do all this as root:
    wget -O – http://deb.opera.com/archive.key | apt-key add -
    echo deb http://deb.opera.com/opera/ stable non-free > /etc/apt/sources.list.d/opera.list
    apt-get update
    apt-get install opera

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s