cannot load watir

J

Junkone

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>
 
J

Junkone

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>

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.
 
B

Bret Pettichord

[Note: parts of this message were removed to make it a legal post.]

require 'rubygems'
require '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>


--
Bret Pettichord
Lead Developer, Watir, www.watir.com

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

Bret Pettichord

[Note: parts of this message were removed to make it a legal post.]

There is an environment variable that automatically loads rubygems.

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>

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.


--
Bret Pettichord
Lead Developer, Watir, www.watir.com

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

Luis Lavena

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.
 
J

Junkone

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

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=<WHAT SHOULD I PUT HERE>
 
L

Luis Lavena

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=<WHAT SHOULD I PUT HERE>

RubyInstaller no longer adds RUBYOPT

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

Junkone

RubyInstaller no longer adds RUBYOPT

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top