Solution: In Ruby 1.8.4 or later, you need to preceed the "require
'watir'" command with "require 'rubygems'".

How frustrating that this is not pointed out in the Watir
documentation or examples. I found the solution in another discussion
forum.

In general I'm very disappointed with the sorry state of Watir
installation documentation, all of which seems ad hoc, poorly
integrated and universalized, and taking for granted big steps (e.g.
using IRB, creating scripts in .rb files, executing .rb files, etc).
Curiously, nearly all Watir documentation jumps right from installing
the gems to using the Watir API, ignoring such critical steps as
opening a Command Prompt with Ruby, opening IRB, requiring rubygems,
editing and executing a .rb file, etc. Of course the Watir
documentation shouldn't have to explain Ruby, IRB, or any other
integrated technology in detail, but it should give the necessary
steps in order to successfully complete a basic Watir command for
someone like me who wasn't familiar with Ruby or IRB and certainly has
no clue about which gems need to be required.

Cheers,
John


On Apr 7, 7:56 pm, John Williams <jwil...@gmail.com> wrote:
> I couldn't get FireWatir to work on Mac, so I'm trying a more basic
> installation (I hope) of Watir with IE for Windows XP. After
> successfully installing the latest Ruby, RubyGems, and Watir 1.6.5,
> every Watir script I run chokes on the "require" command with the
> error "no such file to load". This occurs whether I am executing a
> Ruby script or typing "require 'watir'" in the IRB command line.
> Clearly Ruby can't find "watir".
>
> Since Watir installed successfully, do I need to use "require"
> commands from any particular directory?
>
> Any suggestions appreciated!
>
> Thanks,
> John

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using "remove me" as the subject.

Reply via email to