Hi charley,

Thanks!! I think half of my problem is solved.

Now that load error is not coming.

However things are still not working fine. This is what I'm getting now.

 

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

 

C:\Documents and Settings\parul.upadhyay>gem update --system

C:/Ruby/bin/gem:24: uninitialized constant Gem::GemRunner (NameError)

 

C:\Documents and Settings\parul.upadhyay>

 

Also while executing my script to simply google search it is sending an
error like this

 

>ruby e1.rb

e1.rb:11: undefined local variable or method `watir' for main:Object
(NameError)

>Exit code: 1

 

Please find the attached document for the script.

IRB doesn't remain on the screen; it disappears as I open it.

 

Parul

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: Tuesday, December 09, 2008 10:02 PM
To: [email protected]
Subject: [wtr-general] Re: LoadError

 

You're behind a proxy, try this: 

http://wiki.openqa.org/display/WTR/Installing+ruby+gems+from+behind+prox
y+firewall

 


Charley Baker
blog: http://charleybakersblog.blogspot.com/
Project Manager, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct



On Tue, Dec 9, 2008 at 3:42 AM, Parul Upadhyay <
[EMAIL PROTECTED]> wrote:


Hi Tony,


1) This is what I'm getting when run it at cmd....

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\parul.upadhyay>gem update --system
Updating RubyGems
ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
   Errno::ECONNREFUSED: No connection could be made because the target
machine
actively refused it. - connect(2) (http://gems.rubyforge.org/yaml)

C:\Documents and Settings\parul.upadhyay>gem install watir
ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  could not find gem watir locally or in a repository



2) This is what I'm getting when I run at irb


irb(main):001:0> require "watir"

LoadError: no such file to load -- watir
       from
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
m_original_require'
       from
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
       from (irb):1

irb(main):002:0>



-Parul





-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony
Sent: Tuesday, December 09, 2008 2:58 PM
To: Watir General
Subject: [wtr-general] Re: LoadError


Hi Parul,

try running this at the cmd ...
gem update --system
gem install watir

After everything is installed try running in irb.

Also once you start irb from cmd or run dialog .. you dont need to
enter irb within it.
This is what it will look like in irb.
irb(main):001:0> require "watir"
=> true
irb(main):002:0>

i see that you have started irb again and to run require you are
using
irb require "watir"  ... is wrong. (just use require "watir")

-Tony







 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

<<inline: image001.gif>>

# the Watir controller
require 'rubygems'
require 'watir'
require 'test/unit'

# set a variable
test_site = "http://www.google.com";

# open a browser
browser = watir::Browser.new

# print some comments
puts "Beginning of test: Google search."

puts " Step 1: go to the test site: " + test_site
IE.goto test_site

puts " Step 2: enter 'pickaxe' in the search text field."
browser.text_field(:name, "q").set "pickaxe" # "q" is the name of the search 
field

puts " Step 3: click the 'Google Search' button."
browser.button(:name, "btnG").click # "btnG" is the name of the Search button

puts " Expected Result:"
puts "  A Google page with results should be shown. 'Programming Ruby' should 
be high on the list."

puts " Actual Result:"
if browser.text.include? "Programming Ruby"  
  puts "  Test Passed. Found the test string: 'Programming Ruby'. Actual 
Results match Expected Results."
else
  puts "  Test Failed! Could not find: 'Programming Ruby'." 
end

puts "End of test: Google search."

Reply via email to