require failes for win32/clipboard

A

Axel

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?
 
A

Axel

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

This does the trick:

require 'Win32API'
require 'win32/clipboard'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top