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