Exception `NameError' at ./response.rb:75 - undefined method `size' for #<File:0x402a30b4> ./response.rb:75:in `body_length': undefined method `size' for #<File:0x402a30b4> (NameError) from ./ppsd_information_server_service.rb:37:in `response_filter' from ./serverservice.rb:60:in `response' from (eval):3:in `response' from ./serverservice.rb:75:in `connect' from ./serverservice.rb:60:in `response' from (eval):3:in `response' from ./serverservice.rb:48:in `output_data' from ./serverservice.rb:18:in `start' ... 6 levels... from ./tcpserver.rb:9:in `accept' from ./tcpserver.rb:18:in `start' from ./PermanentObject.rb:10:in `start' from /home/kbttshy/rppsd/src/ppsd:55
shelby:/etc# diff ddclient.conf /usr/local/src/ddclient-3.6.1/sample-etc_ddclient.conf 41c41 < protocol=dyndns2 # default protocol --- > #protocol=dyndns2 # default protocol 46,47c46,47 < login=xxxxxx # default login < password=xxxxxx # default password --- > #login=your-login # default login > #password=test # default password 57,59c57,59 < server=members.dyndns.org, \ < protocol=dyndns2 \ < xxxxx.dyndns.org --- > # server=members.dyndns.org, \ > # protocol=dyndns2 \ > # your-dynamic-host.dyndns.org
export RUBYLIB="/home/kbttshy/src/ruby/lib"上から下のように修正した、
export RUBYLIB="/home/kbttshy/src/ruby/lib:/usr/local/src/ruby-1.6.5/ext/tk/lib:/usr/local/src/ruby-1.6.5/ext/tcltklib/lib:/usr/local/lib/ruby/1.6"
class Forwarder < Response def initialize(request) xxx = Forwarder.xxx(request) . . . super(ServerService.new.response(...)) end def Forwarder.xxx(request) . . . end end
class Forwarder < Response; end class << Forwarder def new(request) xxx = xxx(request) . . . ServerService.new.response(...) end def xxx(request) . . . end endnewメソッドの戻り値が、そのクラスにならないのは変だが、今一番納得できる答えのようだ。 明日修正しよう。