Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
How to get DRb and Webrick to work together?
Sal Syed
9/1/2007 5:50:00 AM
Hi,
I'm trying to run Webrick and DRb on the same program. I run them on
different ports. The problem is they both try to take over the entire
process
$user[:drbserver]=DistributedSearch.new($user,$database)
DRb.start_service("druby://localhost:#{$config[:drbport]}",$user[:drbserver])
puts "Starting server process"
# Start the server thread.
server.start
The following code stops and I never get to start the webserver.
Can someone help? I'm new to ruby not sure how to set these up to run in
their own threads properly.
--
Posted via
http://www.ruby-...
.
1 Answer
Michael Linfield
9/1/2007 8:49:00 AM
0
Sal Syed wrote:
> Hi,
> I'm trying to run Webrick and DRb on the same program. I run them on
> different ports. The problem is they both try to take over the entire
> process
>
>
> $user[:drbserver]=DistributedSearch.new($user,$database)
> DRb.start_service("druby://localhost:#{$config[:drbport]}",$user[:drbserver])
>
> puts "Starting server process"
> # Start the server thread.
> server.start
>
> The following code stops and I never get to start the webserver.
service=DRb.start_service("druby://localhost:#{$config[:drbport]}",$user[:drbserver])
Thread.new do
while service != nil
server.start
end
Worth giving a shot....Also you might want to google 'Ruby
multithreading' for more info on the subject.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
How to get DRb and Webrick to work together?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password