'waves server' fails on windows

3 views
Skip to first unread message

ma2

unread,
Jan 4, 2009, 12:04:20 AM1/4/09
to rubywaves
Hi all,

Long time. I am working on translation of Waves tutorial again.
I've installed waves 0.8.2 on my PC (WinXP sp3), and followed tutorial
of compact app. But at the first step, I've failed to run waves
server. Following is the log.
---
D:\waves\spit_ball>waves server
** Waves 0.8.2 **
I, [2009-01-04 13:53:41 #768] INFO -- : Logger started.
I, [2009-01-04 13:53:41 #768] INFO -- : Waves::Server starting ...
I, [2009-01-04 13:53:42 #768] INFO -- : ruby-debug enabled
d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/ext/kernel.rb:
15:in `trap': unsupported signa
l SIGHUP (ArgumentError)
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
ext/kernel.rb:15:in `safe_trap'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
ext/kernel.rb:15:in `each'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
ext/kernel.rb:15:in `safe_trap'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
runtime/worker.rb:49:in `set_tra
ps'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
runtime/worker.rb:29:in `start'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
runtime/worker.rb:13:in `run'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/lib/
commands/server.rb:65
from d:/dev/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `gem_original_r
equire'
from d:/dev/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require'
from d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/bin/
waves:27
from d:/dev/ruby-1.8/bin/waves:19:in `load'
from d:/dev/ruby-1.8/bin/waves:19
---
My ruby version is not newest. Is it problem?
---
D:\waves\spit_ball>ruby -v
ruby 1.8.6 (2007-06-07 patchlevel 36) [i386-mswin32]
--
Any sugestionas are welcome.

regards,
keiichi matsunaga @:)

Mike Pence

unread,
Jan 4, 2009, 12:51:01 PM1/4/09
to ruby...@googlegroups.com
Suggestion: Don't use Windows.

Jerry

unread,
Jan 4, 2009, 5:45:25 PM1/4/09
to rubywaves
Keiichi-san,

The error message is telling you that this is a Ruby exception
(ArgumentError); the error is with the argument to #trap() -- it
doesn't recognise SIGHUP.

If it's a Ruby exception, that means it can be caught and ignored. If
SIGHUP isn't recognised, there's no point trying to trap it. If you
don't know what SIGHUP is (and there's no reason you should) don't
worry.

The fix is simple if you feel up to it. Find the file mentioned in
the error message (d:/dev/ruby-1.8/lib/ruby/gems/1.8/gems/waves-0.8.2/
lib/ext/kernel.rb). The error message tells you the problem is with
line 15. When you find it, it will look like this:-

signals.each { |s| trap(s) { yield } }

change that to...

signals.each { |s| trap(s) { yield } rescue nil}

which will catch the Argument Error and (essentially) ignore it.

Try that; if it doesn't work, let us know and we'll try again.

Best wishes,
Jerry

PS: This is only a temporary fix to get you going again. It will be
lost when the next version of Waves is released. Unless the powers
that be provide a more permanent fix. Not sure what that should be.
I suppose it's asking too much for Ruby on Windows to provide a list
of supported signals to check against?

ma2

unread,
Jan 4, 2009, 11:23:09 PM1/4/09
to rubywaves
Mike-san, Jerry-san,

Thanks for your advise.
I've understood SIGHUP is not supported on Windows platform.
When I first checked kernel.rb, I found some code to support Windows
platform. So I thought 'Windows IS supported by waves!'. But It was
not true. I'll try Jerry-san's small patch and linux platform.

Thanks,
keiichi matsunaga @:)

Matthew King

unread,
Jan 5, 2009, 11:54:49 AM1/5/09
to ruby...@googlegroups.com
On Sun, Jan 4, 2009 at 10:23 PM, ma2 <keiichi.200...@gmail.com> wrote:
>
> Mike-san, Jerry-san,
>
> Thanks for your advise.
> I've understood SIGHUP is not supported on Windows platform.
> When I first checked kernel.rb, I found some code to support Windows
> platform. So I thought 'Windows IS supported by waves!'. But It was
> not true. I'll try Jerry-san's small patch and linux platform.

I could swear we already cycled through this problem with traps and Windows.

Daniel Yoder

unread,
Jan 5, 2009, 5:07:40 PM1/5/09
to ruby...@googlegroups.com
> I could swear we already cycled through this problem with traps and
> Windows.

We did but I did change this code a bit so as not to rename
Kernel#trap (i called it #safe_trap). I never tested the changes on
Windows.

See

http://github.com/dyoder/waves/tree/master/lib/ext/kernel.rb, line 14
http://github.com/dyoder/waves/tree/master/lib/runtime/worker.rb, line
48

Regards,
Dan

ab5tract

unread,
Jan 6, 2009, 11:00:23 AM1/6/09
to rubywaves
I remain thinking that Waves should smolder. But everyone already
knows I'm a compatibility freak. Anyway, I'll look into making it
happen if there is any interest.

Any luck with that little patch, Keiichi-san?

ma2

unread,
Jan 7, 2009, 12:48:26 AM1/7/09
to rubywaves
Hi,

I have tried 'rescue nil' patch, and it works.
But I just started 'waves server', so there may be some (other)
problems.

thanks all
keiichi matsunaga @:)
Reply all
Reply to author
Forward
0 new messages