From: ideal one Date: 2011-08-11T02:36:32+09:00 Subject: Re: Undefined method error for File IO operation Chris White wrote in post #1016012: > On Aug 10, 2011, at 10:20 AM, ideal one wrote: > >> log = TeeLogger.new(fh,$stderr) >> >> >> pls help me resolve this issue > > Since you're interacting with OptionParser, we'll need to see how you > ran the script on the command line. > > Regards, > Chris White > http://www.twitter.com/cwgem Hi, i am picking default values that i am using in optparser class, something like this... options.logfile = LOGFILE options.results_dir = Pathname.new(ENV['TEMP']) PROG = Pathname.new($0).basename EFIX = PROG.sub(/\..*$/,'') LOGFILE = Pathname.new("#{ENV['TEMP']}/#{FPREFIX}.log") Im running it on eclipse and on also on cmd i get the same error....So when i run=> ruby opttest.rb "C:/Users/user1/workspace/Test/opttest.rb:153:in `
': undefined method `logfile' for # (NoMethodError) -- Posted via http://www.ruby-forum.com/.