Ubuntu FireWatir LoadError

38 views
Skip to first unread message

virtualpt

unread,
Sep 2, 2008, 4:00:02 PM9/2/08
to Watir General
Hi All,

paul@izzybuntu:~$ gem list firewatir

*** LOCAL GEMS ***

firewatir (1.2.1)
Automated testing tool for web applications using Firefox browser.
paul@izzybuntu:~$ irb
irb(main):001:0> require 'firewatir'
LoadError: no such file to load -- firewatir
from (irb):1:in `require'
from (irb):1
irb(main):002:0>

Why does list show the gem, but the require in IRB errors?

Thanks
Paul

virtualpt

unread,
Sep 2, 2008, 5:34:10 PM9/2/08
to Watir General
Managed to work it out. Needed

require 'rubygems'
require 'firewatir'

Can anyone please tell me why I need require 'rubygems' on Ubuntu, but
didn't need it on windows?

Thanks
Paul

virtualpt

unread,
Sep 2, 2008, 5:16:05 PM9/2/08
to Watir General
OK, hunted about & found a solution,

have to do
require 'rubygems'
require 'firewatir'

Can anyone tell me why I have to do this on Ubuntu, but never had to
on Windows?

Thanks

Paul

On Sep 2, 9:00 pm, virtualpt <virtua...@googlemail.com> wrote:

Charley Baker

unread,
Sep 2, 2008, 8:56:28 PM9/2/08
to watir-...@googlegroups.com
If you installed on Windows using the 1click installer, it sets an environment variable RUBYGEMS, so that step isn't required.
--
Charley Baker
blog: http://charleybakersblog.blogspot.com/
Project Manager, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct

virtualpt

unread,
Sep 3, 2008, 3:24:14 PM9/3/08
to Watir General
Thanks Charley,

Is it possible to set a RUBYGEMS environment variable on Ubuntu, or
isn't it good practice?

Many Thanks

Paul

ps sorry about duplicate post above, it didn't seem to have sent it
the first time :-)
> Project Manager, Watir,http://wtr.rubyforge.org

Bret Pettichord

unread,
Sep 3, 2008, 4:17:14 PM9/3/08
to watir-...@googlegroups.com
It might actually be called RUBY_LIBS, but the environment variables
should work the same on Windows and Ubunto.

However, my recommendation would be to add an explicit "require
'rubygems'" to your script. This will do not harm on Windows.

Bret

virtualpt

unread,
Sep 3, 2008, 4:27:58 PM9/3/08
to Watir General
Thanks Bret,

Have been a Java developer for years, but fairly new to Ruby, so these
kinds of tips are great, thanks :-)

WATIR is superb, many thanks for all of your hard work making it so
good. Nearly all of our web testing is now done using WATIR, just a
few old Selenium scripts to replace :-)

Thanks again
Paul
Reply all
Reply to author
Forward
0 new messages