Cannot load watir

as you can see, i have the watir gem installed but cannot load it in
irb. dont know how to troubleshoot this.

U:>irb
irb(main):001:0> require ‘watir’
LoadError: no such file to load – watir
from (irb):1:in `require’
from (irb):1
irb(main):002:0> exit

U:>gem list --local watir

*** LOCAL GEMS ***

watir (1.6.6)

U:>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

U:>irb
irb(main):001:0> require ‘watir’
LoadError: no such file to load – watir
from (irb):1:in `require’
from (irb):1
irb(main):002:0>

On Oct 22, 12:03pm, Junkone [email protected] wrote:

U:>gem list --local watir
LoadError: no such file to load – watir
from (irb):1:in `require’
from (irb):1
irb(main):002:0>

i made it to work by loading rubygems first.

U:>irb
irb(main):001:0> require ‘watir’
LoadError: no such file to load – watir
from (irb):1:in `require’
from (irb):1
irb(main):002:0> require ‘rubygems’
=> true
irb(main):003:0> require ‘watir’
=> true
irb(main):004:0>

However, i never had to load rubygems before. the script i am running
was working before i reimaged my machine and reloaded ruby. what did i
miss in my install that i have to require ‘rubygems’ now.

require ‘rubygems’
require ‘watir’

On Fri, Oct 22, 2010 at 11:05 AM, Junkone [email protected] wrote:

U:>gem list --local watir
LoadError: no such file to load – watir
from (irb):1:in `require’
from (irb):1
irb(main):002:0>


Bret P.
Lead Developer, Watir, www.watir.com

Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

There is an environment variable that automatically loads rubygems.

On Fri, Oct 22, 2010 at 11:10 AM, Junkone [email protected] wrote:

irb(main):001:0> require ‘watir’
from (irb):1:in `require’
miss in my install that i have to require ‘rubygems’ now.


Bret P.
Lead Developer, Watir, www.watir.com

Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

On Oct 22, 1:06pm, Junkone [email protected] wrote:

However, i never had to load rubygems before. the script i am running
was working before i reimaged my machine and reloaded ruby. what did i
miss in my install that i have to require ‘rubygems’ now.

Perhaps your old system had the following environment variable:
RUBYOPT=rubygems setup.

On Oct 22, 12:17pm, Luis L. [email protected] wrote:


Luis L.

last time, i used 1 click intaller. not this time. so i probably have
to setup the environment variable. How does it look like.
RUBYOPTS=

On Oct 22, 1:45pm, Junkone [email protected] wrote:


Luis L.

last time, i used 1 click intaller. not this time. so i probably have
to setup the environment variable. How does it look like.
RUBYOPTS=

RubyInstaller no longer adds RUBYOPT

See above, I showed you what RUBYOPT should be set to.

On Oct 22, 2:21pm, Luis L. [email protected] wrote:

On Oct 22, 12:17pm, Luis L. [email protected] wrote:



Luis L.

this actually works.
RUBYOPT=rubygems
this did not work
RUBYOPT=rubygems setup