Exerb and a threaded server

Hi all,

Ruby 1.6.8 and 1.8.0
Windows XP Pro
exerb 2.6.7

Just playing around with exerb. I’m aware that there were some socket
issues, so I tried making this into an exe:

first test

require "socket"
puts “HELLO”

That seemed to work ok.

Then I tried this example, shamelessly stolen from “The Ruby Way”, p. 422:

exetest.rb

require "socket"
PORT = 12321

server = TCPServer.new(PORT)

while session = server.accept
Thread.new(session) do |my_session|
my_session.puts Time.new
my_session.close
end
end

However, when I tried to build and rbc file, it just hangs:

C:\test>ruby -r exerb/mkrbc exetest.rb -> hangs indefinitely

Any ideas?

Regards,

Dan

Well, mkrbc basically just sits back and watches your program run from start
to finish, recording all the required libraries along the way. In this, case
your program sits there waiting for connections, thus mkrbc sits there
waiting for your program. You need to do something to quit the program, and
then mkrbc should write out your recipe file.

HTH,

Nathaniel

<:((><

···

Berger, Daniel [mailto:djberge@qwest.com] wrote:

However, when I tried to build and rbc file, it just hangs:
C:\test>ruby -r exerb/mkrbc exetest.rb -> hangs indefinitely

Any ideas?