From: m_seki@... Date: 2003-01-15T06:28:38+09:00 Subject: Re: drb question > After doing the changes you suggested, I still get: > > C:\atest>ruby drb_client.rb > It is: Tue Jan 14 08:13:59 Central Standard Time 2003 > It is: Tue Jan 14 08:14:01 Central Standard Time 2003 > It is: Tue Jan 14 08:14:03 Central Standard Time 2003 > It is: Tue Jan 14 08:14:05 Central Standard Time 2003 > It is: Tue Jan 14 08:14:07 Central Standard Time 2003 > c:/ruby/lib/ruby/site_ruby/1.7/drb/drb.rb:726:in `current_server': > DRb::DRbServerNotFound (DRb::DRbServerNotFound) > from c:/ruby/lib/ruby/site_ruby/1.7/drb/drb.rb:738:in `uri' hmm. drb_clent.rb does not initialize DRb. but, I found minor bug in drb/drb.rb, without DRb.start_service. Please try either of the followings. (a) initialize DRb, in drb_client.rb. (recommend) | require 'drb' | STDOUT.sync = true | DRb.start_service | | cliObj = DRbObject.new(nil,"druby://localhost:5555") | | 5.times { |i| puts cliObj.time_now; sleep(2); } | | cliObj.bye (b) patch drb/drb.rb. --- drb.rb 27 Dec 2002 23:28:25 -0000 1.92 +++ drb.rb 14 Jan 2003 21:24:03 -0000 @@ -372,7 +372,7 @@ @uri, option = DRbProtocol.uri_option(uri, DRb.config) @ref = DRbURIOption.new(option) unless option.nil? else - @uri = uri ? uri : DRb.uri + @uri = uri ? uri : (DRb.uri rescue nil) @ref = obj ? DRb.to_id(obj) : nil end end (c) return nil (TstSrvr#bye) | def bye(msg="") | puts msg | Thread.new { sleep(1); exit(1) } | nil | end