[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: DRb TupleSpace Example Poofter
From:       edwardhatfield1 () aol ! com (Edward Hatfield)
Date:       2002-02-28 22:19:03
[Download RAW message or body]

Michael Neumann <neumann@s-direktnet.de> wrote in message news:<20020228181158.GA288@michael.neumann.all>...
> 
> Sorry for that.

How Nice :-)  Thanks.  All is forgiven, please come home.
Now lets get this puppy working.

> 
> Could you explain what error messages you got?
> 
I invoked the server like this:
  ruby ./comp_s.rb "druby://localhost:26666"

and got the following messages:
/usr/lib/ruby/site_ruby/1.6/drb/drb.rb:289:in `open': No such file or
directory - "connect(2)" (Errno::ENOENT)
	from /usr/lib/ruby/site_ruby/1.6/drb/drb.rb:289:in `initialize'
	from /usr/lib/ruby/site_ruby/1.6/drb/drb.rb:270:in `new'
	from /usr/lib/ruby/site_ruby/1.6/drb/drb.rb:270:in `open'
	from /usr/lib/ruby/site_ruby/1.6/drb/drb.rb:224:in `method_missing'
	from ./comp_s.rb:12
	from ./comp_s.rb:12:in `loop'
	from ./comp_s.rb:12

When I used my machine name or '0.0.0.0' in place of 'localhost'
I got the same messages.

Am I doing something dumb?
As mentioned before my ruby 'drb' code is version 1.3.4.2

> 
> Regards,
> 
>   Michael

Thanks for your help.

> 
> > Here's the server:
> > #!/usr/bin/ruby
> > # file comp_s.rb
> > 
> > require "drb"
> > 
> > DRb.start_service
> > 
> > ts = DRbObject.new( nil, ARGV[0] )
> > 
> > loop {
> >     # get a request from the TupleSpace
> >     req, a, b = ts.in( ['req', nil, nil] )
> > 
> >     # compute the result
> >     res = a * b
> > 
> >     # to identify the server on the client side
> >     host = DRb.uri.split('//')[1].split(':')[0]
> > 
> >     # put the result back into the TupleSpace
> >     ts.out( ['res', a, b, res, host] )
> > }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic