From: Luis Lavena Date: 2011-04-19T05:40:33+09:00 Subject: Re: Using the win32api On Apr 18, 8:13 am, antoine crouzi wrote: > 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. > 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. -- Luis Lavena