This code demonstrates a client server architecture. I executed the file simple_service.rb on my Ubuntu server (Donatello - 192.168.1.10), then from the CLI output I copied the server uri into the clipboard. I then executed the simple_client.rb on my Ubuntu desktop (Cryton - 192.168.1.3) while passing in the uri as an argument.
require 'drb'
DRb.start_service nil, []
puts DRb.uri
DRb.thread.join
output: druby://donatello.mydomain.com:47159
require 'drb'
DRb.start_service
remote_array = DRbObject.new nil, ARGV.shift
puts remote_array.size
remote_array << 1
puts remote_array.size
from the command line
> ./simple_client.rb druby://192.168.1.10:47159
output:
0
1
Note: I substituted the domain name with the ip address because the name in question was not stored within the DNS settings.
Reference:
Introduction to Distributed Ruby (DRb) [segment7.net]