From: Craig Smith Date: 2013-04-30T08:29:24+09:00 Subject: Unable to call win32-api Hi I'm new to Ruby and am trying to write a small ruby script to call win32-api from scratch, here's what I've done installed Ruby 2.0 using the ruby installer (rubyinstaller-2.0.0-p0.exe) installed the associated devkit (DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe) ensure that both bin dirs are on PATH Here's the error I see when I try to run the script C:\Ruby\Ruby200\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/kaira/src/ruby/main/myruby.rb C:/Ruby/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- win32/api (LoadError) from C:/Ruby/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from D:/kaira/src/ruby/main/myruby.rb:1:in `' from -e:1:in `load' from -e:1:in `
' my line 1 is require 'win32/api', so it appears I'm missing that, or at least its not compiled correctly somehow. Having googled this for a while, the stock recommendation is to recompile the win32-api from source, which I did gem uninstall win32-api gem install win32-api --platform=ruby This succeeded but didn't resolve the issue. Originally I started with the 64 bit versions of Ruby 2.0/DevKit as I'm running Window 7 64bit, although I have now switched to 32bit Ruby2.0/DevKit, again no luck. my installs are in C:\Ruby\Ruby200 C:\Ruby\DevKit my PATH starts with PATH=C:\Ruby\Ruby200\bin;C:\Ruby\DevKit\bin; ... Maybe I'm missing something obvious here, although I can't spot it. Any help appreciated. Thanks -- Posted via http://www.ruby-forum.com/.