[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

require failes for win32/clipboard

Axel

12/28/2007 9:06:00 AM

Hello, all!

In Win32::Clipboard version 0.4.3 (installed via the OneClick
intstaller 1.8.6-26), I get the following error:

c:/ruby/lib/ruby/gems/1.8/gems/win32-clipboard-0.4.3/lib/win32/
clipboard.rb:25: uninitialized constant Win32::Clipboard::Win32API
(NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
32:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
32:in `require'
from test_clipboard.rb:1

Line 1 in test_clipboard.rb is just:
require 'win32/clipboard'

I get the same problem with the test script included with the
Win32::Clipboard gem. Any ideas what's wrong here?
1 Answer

Axel

12/28/2007 9:51:00 AM

0

I've found the solution myself: You have to require Win32API first.

This does the trick:

require 'Win32API'
require 'win32/clipboard'