[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Why Ruby stops working under cygwin

Li Chen

12/21/2008 4:48:00 PM

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.
--
Posted via http://www.ruby-....

5 Answers

aldric[removeme]

12/21/2008 7:40:00 PM

0

Li Chen wrote:
> 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.

Does Cygwin have proper sound drivers installed? Does it know how to
send the sound out?

Luis Lavena

12/22/2008 5:40:00 PM

0

On Dec 21, 2:47 pm, Li Chen <chen_...@yahoo.com> wrote:
> 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.
> --
> Posted viahttp://www.ruby-....

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/rub...

--
Luis Lavena

Li Chen

12/23/2008 12:55:00 AM

0

Luis Lavena wrote:
> On Dec 21, 2:47�pm, Li Chen <chen_...@yahoo.com> wrote:
>> $ irb
>> Posted viahttp://www.ruby-....
> 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/rub...

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



--
Posted via http://www.ruby-....

Luis Lavena

12/23/2008 4:09:00 AM

0

On Dec 22, 10:55 pm, Li Chen <chen_...@yahoo.com> wrote:
> Luis Lavena wrote:
> > On Dec 21, 2:47 pm, Li Chen <chen_...@yahoo.com> wrote:
> >> $ irb
> >> Posted viahttp://www.ruby-....
> > 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/rub...
>
> 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.

--
Luis Lavena

Li Chen

12/23/2008 5:12:00 PM

0

Luis Lavena 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
--
Posted via http://www.ruby-....