On 10/12/2010 01:07 AM, Robert Klemme wrote:
> On Mon, Oct 11, 2010 at 8:16 PM, Joel VanderWerf
>> If you add this line to the client:
>>
>> DRb.start_service
>>
>> then your #each call works.
>
> I do not think this is necessary nor does this seem to be the issue if
> I get Josh correctly.

Yes it is necessary, but no, I don't think that's what he wants.

If you comment out the client's #start_service call in the following, 
you get a DRb::DRbServerNotFound.

$ cat svr.rb
require 'drb'

URI =  "druby://localhost:5555"
class RemoteObj
   include DRb::DRbUndumped

   def some_array
     (0..10).map { RemoteObj.new }
   end
end

s = DRb::DRbServer.new URI, RemoteObj.new
$stderr.puts "Started: #{s.uri}"
s.thread.join

$ cat clt.rb
require 'drb'
URI =  "druby://localhost:5555"
DRb.start_service

ro = DRb::DRbObject.new nil, URI

some_array = ro.some_array

some_array.each do |x|
   p x
end