[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Error while running ruby script

Harry Pat

5/14/2008 10:22:00 PM

Hi,

I am new user of ruby and wrote simple script. After installing Ruby for
Windows, i wrote simple script


require 'watir'
include Watir
goto_site = 'http://www.yaho...
ie = IE.new
ie.goto(goto_site)

when I run above script and I am getting following error message, how to
resolved this one?

E:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_re
quire': no such file to load -- rio (LoadError)
from
E:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
--
Posted via http://www.ruby-....

2 Answers

Axel Etzold

5/14/2008 11:00:00 PM

0


-------- Original-Nachricht --------
> Datum: Thu, 15 May 2008 07:21:47 +0900
> Von: Harry Pat <hp13nov@hotmail.com>
> An: ruby-talk@ruby-lang.org
> Betreff: Error while running ruby script

> Hi,
>
> I am new user of ruby and wrote simple script. After installing Ruby for
> Windows, i wrote simple script
>
>
> require 'watir'
> include Watir
> goto_site = 'http://www.yaho...
> ie = IE.new
> ie.goto(goto_site)
>
> when I run above script and I am getting following error message, how to
> resolved this one?
>
> E:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_re
> quire': no such file to load -- rio (LoadError)
> from
> E:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
> quire'
> --
> Posted via http://www.ruby-....

Hello Harry,

welcome to Ruby. You'll like it :)
The error you're getting is due to the fact that your system cannot
find a Ruby software "package" (called a "gem" in Ruby) -- rio

http://rio.ruby...

which is used as a facade for input/output.

To use an installed gem in a script, you need to write

require "rubygems"
require NAME_OF_YOUR_GEM

in your script.
So simply add that require "rubygems" line to your script and see
what happens.
If the rio gem is installed, it'll work.
Otherwise, you'll need to install it using

gem install rio .


Best regards,

Axel






--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/s...

Harry Pat

5/15/2008 9:45:00 PM

0

Thanks Axel it works.

Harry P.
--
Posted via http://www.ruby-....