# Win32ole and activex

**URL:** <https://www.ruby-forum.com/t/win32ole-and-activex/59674>\
**Category:** Ruby\
**Created:** [May 5, 2006, 10:10am UTC](https://www.ruby-forum.com/t/win32ole-and-activex/59674 "2006-05-05T10:10:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 5, 2006, 10:10am UTC](https://www.ruby-forum.com/t/win32ole-and-activex/59674/1 "2006-05-05T10:10:30Z")

</div>

Hello all,

I tried to use win32ole standardlib with an activex control but I got  
‘Library not registered’ error message.  
Here is the code :

require ‘win32ole’  
sf = WIN32OLE.new(‘MapWinGIS.Shapefile’)  
sf.Open(‘C:/cities/cities.shp’)

method\_missing’: Unknown property or method `Open’  
(WIN32OLERuntimeError)  
HRESULT error code:0x8002801d  
Library not registered

The open method is present in the specs and the library is registered so  
I don’t understand.

I’m not familiar with windows programming so the way I use to connect to  
the activex with ruby is perhaps not the good one.

Does anybody know where the problem come from ?

Thank you.

Johan

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 5, 2006, 4:02pm UTC](https://www.ruby-forum.com/t/win32ole-and-activex/59674/2 "2006-05-05T16:02:15Z")

</div>

Johan,

Are you using soleb.rb application? I ran into similar problems on an  
app I  
have been working with. I was able to use soleb.rb to see how things  
were  
actually being exposed by the WIN32OLE libraries and found significant  
variances between “spec” and “actual”.
