Try adding this to the top of your scripts and let me know if it does not
help:

require "rubygems"

Zeljko

On Tuesday, January 3, 2012, A.Mori <[email protected]> wrote:
> Hi.
>
> Firtsly I would like to say i have been using watir for a small amount
> of time, but nonetheless have managed to write some decent functional
> tests and am very happy using it.
>
> Secondly I would like to thank Zeljko Filipin for his excellent
> instructions and his book which I plan on buying and hoping to see
> further updates!
>
> In any case, i have been following the instuctions to the T on my new
> Macbook, which is running OSX Lion. FIrst off, I cant imagine this
> being the issue as everything works perfectly in IRB. Everything loads
> just fine and all the watir methods work perfectly.
>
> Now moving on to scripts and my future testing suite, i simply cannot
> load watir-webdriver via a script.
>
> I have followed the instructions on
>
http://stackoverflow.com/questions/7964778/no-such-file-to-load-ffi-c-loaderror
> and have managed to uninstall and re-install ffi -v 1.0.9
>
> Again, in IRB, it loads just fine.
>
> I have a ruby script, with one line in it :
>
> general.rb contains :
>
> require "watir-webdriver"
>
> Only.
>
> when i Andrews-MacBook-Pro:~ andrewmori$ ruby general.rb
>
> the following is reported.
>
> general.rb:1:in `require': no such file to load -- watir-webdriver
> (LoadError)
>        from general.rb:1
>
> I would really like to get to using watir and would like to get over
> this slight issue, but i have been fiddling with it for a couple hours
> now and was hoping someone in the community has some advice to offer?
>
> Happy testing (and Happy new year too!)
>
> Kind regards,
>
> Andrew Mori
>
> --
> Before posting, please read http://watir.com/support. In short: search
before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to