On and off I've been messing around trying to get Watir to work on my machine. The gem installed properly based on the instructions given to simple go to the command line and use the following:
gem install watir
But when I tried to execute a simple test I got the following:
uninitialized constant Watir
./watir.rb:6: uninitialized constant Watir (NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
It seemed like an environment variable was not properly referencing the library but when I hunted for it I saw no environment variables. I ran the unit tests for Watir and it seemed to have installed correctly but I noticed the following at the beginning of each:
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
Smells like a path the the library so I investigated with:
which shows me the following:
In order to get the script working I just hacked the $LOAD_PATH to include a hardcoded reference to my Watir libraries:
From there I was set with the following simple script:
ie = Watir::IE.new
I'll dig into this - I haven't had the patience to sit down with a Ruby book just yet (anyone have ideas?) but if anyone has a similar problem running Watir, here is a hack to get you started if this is a hit on your Google search.