From: Chris White Date: 2011-08-11T02:25:29+09:00 Subject: Re: Undefined method error for File IO operation On Aug 10, 2011, at 10:20 AM, ideal one wrote: > Hi, > Below is part of the code that is throwing following exception > > ":in `
': undefined method `logfile' for # > (NoMethodError)" > > > fh = options.logfile.open('w') --> This line is failing > log = TeeLogger.new(fh,$stderr) > log.level = Logger::INFO > 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