From: ts Date: 2003-08-23T21:01:06+09:00 Subject: Re: Problem with null field. Plz help! >>>>> "K" == Kurt Euler writes: K> autogen.rb:301:in `initialize': Permission denied - ./boiler_install_notes/ (Errno::EACCES) One possible case is svg% ls -ld aa d--------- 2 ts ts 4096 Aug 23 13:54 aa/ svg% svg% ruby -e 'p FileTest.exist?("aa"); File.open("aa")' true -e:1:in `initialize': Permission denied - aa (Errno::EACCES) from -e:1:in `open' from -e:1 svg% K> What's weird is that the crash happens when field[5] should be nil -- K> the entire if/end should be skipped. (If I insert a line # 297 puts K> field[5], console just shows does a line space as all puts do. No space K> or tab appears there.) The problem is that you don't make the right test, normally it's K> 298 if field[5] != "" if field[5].to_s != "" K> 299 if FileTest.exist?("./boiler_install_notes/#{field[5]}" ) because this is what do ruby when you write "#{field[5]}" (i.e. it call #to_s for field[5]) Guy Decoux