# Trying to get drb to work

**URL:** <https://www.ruby-forum.com/t/trying-to-get-drb-to-work/128820>\
**Category:** Ruby\
**Created:** [February 11, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/trying-to-get-drb-to-work/128820 "2008-02-11T21:00:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 11, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/trying-to-get-drb-to-work/128820/1 "2008-02-11T21:00:34Z")

</div>

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
