when am following:
http://segment7.net/projects/ruby/drb/introduction.html
I have run the server program on my local pc.
Now if I run the client program on irb like:
obj=DRbObject.new nil, ‘druby://127.0.0.1:2010’
and then I call a method for obj.call_method()
its Ok.
but I cant use my lan address which is supose ip.
then By doing obj=DRbObject.new nil, ‘druby://#{ip}:2010’ ----line 1.
and then calling the method as obj.call_method() gives the following
error:
DRb::DRbConnError: druby://192.168.0.205:2010 - #<Errno::ECONNREFUSED:
Connection refused - connect(2)>
from /usr/lib/ruby/1.8/drb/drb.rb:736:in open' from /usr/lib/ruby/1.8/drb/drb.rb:729:in
each’
from /usr/lib/ruby/1.8/drb/drb.rb:729:in open' from /usr/lib/ruby/1.8/drb/drb.rb:1191:in
initialize’
from /usr/lib/ruby/1.8/drb/drb.rb:1171:in new' from /usr/lib/ruby/1.8/drb/drb.rb:1171:in
open’
from /usr/lib/ruby/1.8/drb/drb.rb:1087:in method_missing' from /usr/lib/ruby/1.8/drb/drb.rb:1105:in
with_friend’
from /usr/lib/ruby/1.8/drb/drb.rb:1086:in `method_missing’
from (irb):18
from :0
Why? how to fix it.
Another thing I cant understand… then why we din’t get any error at
line 1.?