Ruby sample code runtime problem

Hello all,

When I run this example:

ie = WIN32OLE.new(‘InternetExplorer.Application’)
ie.visible = true
ie.gohome

I get the following error:

Error on line 2: uninitialized constant WIN32OLE

The example is from:

http://www.ruby.ch/ProgrammingRuby/htmlC/win32.html

Any suggestions on how to correct this ?

Did you:
require ‘win32ole’
first?

Tom.

···

Hello all,

When I run this example:

ie = WIN32OLE.new(‘InternetExplorer.Application’)
ie.visible = true
ie.gohome

I get the following error:

Error on line 2: uninitialized constant WIN32OLE

The example is from:

http://www.ruby.ch/ProgrammingRuby/htmlC/win32.html

Any suggestions on how to correct this ?


.^. .-------------------------------------------------------.
/V\ | Tom Gilbert, London, England | http://linuxbrit.co.uk |
/( )\ | Open Source/UNIX consultant | tom@linuxbrit.co.uk |
^^-^^ `-------------------------------------------------------’

Tom Gilbert tom@linuxbrit.co.uk wrote in message news:20020808181014.GQ5924@offended.co.uk

···

Hello all,

When I run this example:

ie = WIN32OLE.new(‘InternetExplorer.Application’)
ie.visible = true
ie.gohome

I get the following error:

Error on line 2: uninitialized constant WIN32OLE

The example is from:

http://www.ruby.ch/ProgrammingRuby/htmlC/win32.html

Any suggestions on how to correct this ?

Did you:
require ‘win32ole’
first?

Tom.

From same link I had ran different example that did have require statement
and I got same result/error as I did from running this example.

My guess is since although Im a newbie to Ruby is that It cant find win32ole stuff.

That’s fair enough - it’s quite possible that the ruby package you
installed did not include the win32ole module and that you either need
to install it seperately or you need to find a package that does
incorporate it. Try the RAA, http://www.ruby-lang.org/en/raa.html, or
more specifically:
http://www.ruby-lang.org/en/raa-list.rhtml?name=Win32OLE

Tom.

···

Tom Gilbert tom@linuxbrit.co.uk wrote in message news:20020808181014.GQ5924@offended.co.uk

The example is from:

http://www.ruby.ch/ProgrammingRuby/htmlC/win32.html

Any suggestions on how to correct this ?

Did you:
require ‘win32ole’
first?

Tom.

From same link I had ran different example that did have require
statement and I got same result/error as I did from running this
example.

My guess is since although Im a newbie to Ruby is that It cant find
win32ole stuff.


.^. .-------------------------------------------------------.
/V\ | Tom Gilbert, London, England | http://linuxbrit.co.uk |
/( )\ | Open Source/UNIX consultant | tom@linuxbrit.co.uk |
^^-^^ `-------------------------------------------------------’

Tom Gilbert tom@linuxbrit.co.uk wrote in message news:20020809212536.GR5924@offended.co.uk

···

Tom Gilbert tom@linuxbrit.co.uk wrote in message news:20020808181014.GQ5924@offended.co.uk

The example is from:

http://www.ruby.ch/ProgrammingRuby/htmlC/win32.html

Any suggestions on how to correct this ?

Did you:
require ‘win32ole’
first?

Tom.

From same link I had ran different example that did have require
statement and I got same result/error as I did from running this
example.

My guess is since although Im a newbie to Ruby is that It cant find
win32ole stuff.

That’s fair enough - it’s quite possible that the ruby package you
installed did not include the win32ole module and that you either need
to install it seperately or you need to find a package that does
incorporate it. Try the RAA, http://www.ruby-lang.org/en/raa.html, or
more specifically:
http://www.ruby-lang.org/en/raa-list.rhtml?name=Win32OLE

Tom.

Tom,

Thanks for assistance in this matter. This was exactly the problem
that win320ole module was not installed. Once I installed it examples
ran like a charm.

Thanks