From: Chuck Remes Date: 2009-09-03T06:58:48+09:00 Subject: Re: ruby 1.8.6 p287 and p383 crashing in WIN32OLE_EVENT.message_loop On Sep 2, 2009, at 4:43 PM, Daniel Berger wrote: > > >> It can't seem to load a few of its dependencies like "windows/com". >> >> 1. The gem doesn't have a dependency on the windows-api gem. >> >> 2. The windows-api gem, after installation, doesn't have a lot of the >> files that pr-win32ole wants to load. > > There is no gem for pr-win32ole. All you should need to do is: > > gem install windows-pr > > That should install win32-api and windows-api automatically. It should > then "just work" as long as RUBYOPT is set. If it doesn't, please give > me a specific error you're getting. Well, I ran 'gem build pr-winole32.gemspec' so it was easy to install. I now have everything up and going. When I run my program, it crashes on a call to WIN32OLE_EVENT.message_loop. starting... C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/win32ole.rb: 701:in `[]=': index 8 out of string (IndexError) from C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/ win32ole.rb:701:in `ole_val2variant' from C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/ win32ole.rb:4481 from (eval):3:in `call' from (eval):3:in `DispatchMessage' from C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/ win32ole.rb:5034:in `ole_msg_loop' from C:/Ruby/lib/ruby/gems/1.8/gems/pr-win32ole-1.0.0/lib/pr/ win32ole.rb:5039:in `message_loop' from //.host/Shared Folders/My Documents/NetBeansProjects/ ChuckKit/lib/main.rb:165 If that trace looks crappy, view it here: http://pastie.org/603650 I need to point out that it is crashing way earlier than the stock WIN32OLE stuff. This test program works just fine using MRI's WIN32 classes. I figured once I had everything up and going I could trigger that event which was causing my other code to bomb out. cr