From: John Maclean Date: 2006-02-02T22:33:35+09:00 Subject: Re: File.new error Could this method be extended to acept input from stdin? Something similar to:- def testwrite File.open("testfile", "w") { |file| file.gets "test" } end testwrite The intention is to read lines from stdnin and put them into the file... On Wed, 4 Jan 2006 22:03:03 +0900 Kai Vermehr wrote: > Hi Forum, > > I'm trying to create a file but I'm getting an error and can't find > the problem: > > ------------------------- > aFile = File.new("rubytestfile") > > puts "hello" > > aFile.close > ------------------------- > > I get this error. I'm working on Mac OS X: > > Errno::ENOENT: No such file or directory - rubytestfile > > thanks for any help! > -- John Maclean MSc (DIC) 07739 171 531