Using the win32api

Hi all,

I’m trying to use the win32api, in the Sketchup ruby API. then loading
the package with

require “win32api”

I get the following error :

no such file to load – win32api

I’m using this page as a reference :
http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_windows.html.

Am I doing something wrong ? do I need to install a gem before using the
api ?

I’m on windows with ruby 1.8.6, installed via the windows binary
package. I think it might be a problem with the ruby paths.

I have search for a file called win32api in the ruby installation
directory, there is a .so file, but no .rb file.

Thanks,

Futar

On Apr 18, 8:13am, antoine crouzi [email protected] wrote:

SketchUp provides it’s own version of Ruby that you can’t replace or
mix with a another installation.

win32api is a Ruby C-extension and its file extension is “.so” so that
part is correct, you will find it on any installation of
RubyInstaller.

However, if that file is missing from sketchup, you could try placing
in the valid Ruby paths of the tool, but I recommend not to, specially
since things could explode on your face.

AFAIK SketchUp uses an old version of Ruby and RubyInstaller has been
provided for modern versions, mixing them could lead to issues.

Daer, Mr.David Willey;

Mr. David I dont know what can i do ? I have Ruby on rails V 1.7.2 , and
my friend referencing for me using Win32 Ole and then i find your list.

win32api is a Ruby C-extension and its file extension is “.so” so that

Luis L.

My Nane : Cici WirachmatSignature powered by WiseStamp

re,

interestingly enough, if I copy the win32api.so in the plugin directory,
I’ve got a different error :

127: La procédure spécifiée est introuvable. - Init_win32api

[127: The specified procedure could not be found. - Init_win32api]

any ideas to make it work ?

solution : require ‘Win32API’ :slight_smile:

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