trying to get drb to work ...

W

wbsurfver

I'm playing around with drb, I started up this simple server
on the rails hosting server that has my website hosted:
the value of DRb.uri here displays 'druby://free.net:61676'
just as I have it. This machine has ruby 1.8.5, I have 1.8.6 on my
laptop.


require 'drb'

mydata = {'vacation' => 'surf', 'work' => 'web', 'summer' => 'camp',
'test' => 'code'}


DRb.start_service('druby://free.net:61676', mydata)


puts DRb.uri

DRb.thread.join


=======================================

Now when I run the client program below on my laptop while I am inside
my company firewall and all that, the value of DRb.uri is this even
though I specifed the same thing as in the server:

'druby://LT-MYNAME.office.mycompany.com:1298'

Why is that and what else can I try ? I can browse the internet from
my laptop, so it's not like I am isolated or anything.

Then there is an error (see below)


require 'drb'

DRb.start_service


myshared = DRbObject.new(nil,
'druby://free.net:61676')


puts DRb.uri

myshared.each do |k,v|
puts k

end

error I get:

c:/ruby/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://frees.net:6167
6 - #<Errno::EBADF: Bad file descriptor - connect(2)>
(DRb::DRbConnError)
from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `each'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `open'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `new'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `open'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'
from C:/rb-play/drb/client.rb:17
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

drb works on one system fails on other 2
dchat 0
drb load limit 3
error message help 1
DRbFire testing fails 2
DRb::DRbBadScheme when using drbunix sockets, why? 3
DRb and exceptions 2
DRb and unknown_methods 2

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top