Error while running ruby script


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 = ‘
ie =

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

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:inre

-------- Original-Nachricht --------

Datum: Thu, 15 May 2008 07:21:47 +0900
Von: Harry P. [email protected]
An: [email protected]
Betreff: Error while running ruby script


Posted via

Hello Harry,

welcome to Ruby. You’ll like it :slight_smile:
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

which is used as a facade for input/output.

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

require “rubygems”

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,


Thanks Axel it works.

Harry P.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs