DRb-loopback ip works but Lan ip doesnt

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.?

On 9 Oct 2012, at 04:51, ajay paswan [email protected] wrote:

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.

Local host connection. Typically not fire walled, always works
irrespective of hardware issues.

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:

Public ip connection. Often fire walled, impacted by hardware.

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’

Why? how to fix it.
Another thing I cant understand… then why we din’t get any error at
line 1.
Any number of reasons. Check your firewall rules, verify your hardware
is good, verify you have a daemon listening on the port etc. sounds like
a networking issue, not a ruby issue.