[lnkForumImage]
TotalShareware - Download Free Software

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


 

Hanan Mneimneh

3/8/2007 10:49:00 AM

Hello

what could I use to start and shutdown webrick from within a ruby script an
not direclty from the command prompt. please Help

Thanks in advance

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/...


4 Answers

Alex Young

3/8/2007 10:52:00 AM

0

Hanan Mneimneh wrote:
> Hello
>
> what could I use to start and shutdown webrick from within a ruby script
> an not direclty from the command prompt. please Help
>
> Thanks in advance
>
There are some good examples here:

http://www.we...

--
Alex

Oliver Vecernik

3/8/2007 10:59:00 AM

0

Hanan Mneimneh wrote:

> what could I use to start and shutdown webrick from within a ruby script
> an not direclty from the command prompt. please Help

http://www.webrick.or...

--
Cheers,
Oliver

benjohn

3/8/2007 11:23:00 AM

0


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



benjohn

3/8/2007 5:03:00 PM

0

Oddly, none of this happens when I run directly from irb (I've not tried
a stand alone script). I've only encountered it when I'm using the fxri
interface, so I'm just using the vanila comand line.

Strange.

Thanks,
Benjohn