John Stoffel wrote: > Hi, > > I've got some code which seems to work well, but the warning messages > are driving me insane! I can't use this code if it's always going to > spew warnings like these on a CentOS 5.2 system with ruby 1.8.5 > (2006-08-25) [i386-linux] as the environment. I'm also using > slave-1.2.1 from http://www.codeforpeople.com > as well. > > > $ ./readdir-slave-only.rb --kids 4 tmp > Starting Slave Counter > Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 - > drbunix:///tmp/slave_counter_537520870_11835_11836_0_0.697410256497375 > Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 - > drbunix:///tmp/slave_counter_537520870_11835_11836_0_0.697410256497375 The exception is "normal" insofar as being expected behavior from DRb. It tries each loaded protocol until it finds a match, rescuing the non-matches. You are seeing these messages because you have $DEBUG=true. If you are determined to avoid them in the presence of $DEBUG then you could put a preferred protocol at the beginning of the search list. module DRb::DRbProtocol module_function def prefer_protocol(proto) @protocol.delete(proto) @protocol.unshift(proto) end end DRb::DRbProtocol.prefer_protocol(DRb::DRbUNIXSocket) -- Posted via http://www.ruby-forum.com/.