Forum: Ruby Why Ruby stops working under cygwin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Li C. (Guest)
on 2008-12-21 18:56
Hi all,

I want to call voice function using win32ole under cygwin. But Ruby
always stops working and a new window pops up the error message. I
wonder how to fix it.

Thanks,

Li

$ irb
irb(main):001:0> require 'win32ole'
=> true
irb(main):002:0>
irb(main):003:0*  v=WIN32OLE.new('SAPI.SpVoice')
=> #<WIN32OLE:0x7ffa1a0c>
irb(main):004:0> v.speak('hello')


Error message in the pop windows:
Ruby interpreter (CUI) 1.8.7.o [i386-cygwin] has stopped working.
Luis L. (Guest)
on 2008-12-22 19:45
(Received via mailing list)
On Dec 21, 2:47 pm, Li Chen <removed_email_address@domain.invalid> wrote:
> $ irb
> Posted viahttp://www.ruby-forum.com/.
From my experience Cygwin doens't play nice with Windows Native API.
For having Win32OLE working properly I suggest you use One-Click Ruby
Installer instead.

http://rubyforge.org/projects/rubyinstaller
Li C. (Guest)
on 2008-12-23 03:03
Luis L. wrote:
> On Dec 21, 2:47�pm, Li Chen <removed_email_address@domain.invalid> wrote:
>> $ irb
>> Posted viahttp://www.ruby-forum.com/.
> From my experience Cygwin doens't play nice with Windows Native API.
> For having Win32OLE working properly I suggest you use One-Click Ruby
> Installer instead.
>
> http://rubyforge.org/projects/rubyinstaller

Hi Luis,

I also have One-Click Ruby Installer on my PC. The problem is that
timeout doesn't work under PC.  So I try Cygwin  and I find it works
fine.


Li
Luis L. (Guest)
on 2008-12-23 06:10
(Received via mailing list)
On Dec 22, 10:55 pm, Li Chen <removed_email_address@domain.invalid> wrote:
> Hi Luis,
>
> I also have One-Click Ruby Installer on my PC. The problem is that
> timeout doesn't work under PC.  So I try Cygwin  and I find it works
> fine.
>

But then Win32OLE will not work properly under Cygwin. There is always
a catch.
Li C. (Guest)
on 2008-12-23 19:21
Luis L. wrote:

>
> But then Win32OLE will not work properly under Cygwin. There is always
> a catch.


Here is my solution: When I use timeout library I use Ruby under cygwin.
When I use win32ole I use Ruby under vista. It is kind of weird but this
is how I let the work done.

Li
This topic is locked and can not be replied to.