benjohn
3/8/2007 11:23:00 AM
I'm trying to start up webrick on my NT box.
irb(main):003:0> s = WEBrick::HTTPServer.new(:Port => 4567)
Errno::EBADF: Bad file descriptor
from c:/ruby/lib/ruby/1.8/webrick/log.rb:40:in `write'
from c:/ruby/lib/ruby/1.8/webrick/log.rb:40:in `<<'
from c:/ruby/lib/ruby/1.8/webrick/log.rb:40:in `log'
from c:/ruby/lib/ruby/1.8/webrick/log.rb:85:in `log'
from c:/ruby/lib/ruby/1.8/webrick/log.rb:51:in `info'
from c:/ruby/lib/ruby/1.8/webrick/server.rb:55:in `initialize'
from c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from (irb):3:in `new'
from (irb):3
from :0
irb(main):004:0>
I've tried a few other port numbers picked at random, but no joy. I also
get a similar problem if I just try to open up a TCP socket, so this
seems related:
irb(main):006:0> s = Socket::TCPServer.new(45673)
Errno::EBADF: Bad file descriptor
from (irb):6:in `write'
from (irb):6
from :0
irb(main):007:0>
Could anyone suggest what the problem is?
Thanks,
Benjohn