From: kohljonathan@... (Jonathan Kohl) Date: 2005-04-06T12:19:39+09:00 Subject: Re: Error using csv.rb - (Errno::ENOENT) Ryan Davis wrote in message news:<49943fb9252d2a0dfae8d0653965c648@zenspider.com>... > On Apr 5, 2005, at 2:44 PM, Jonathan Kohl wrote: > > > I keep running into this error "(Errno::ENOENT)" when using csv.rb. > > I'm not sure what this error means, and I'm wondering if I'm missing > > something obvious. This example from p. 241 of _The Ruby Way_ causes > > the following output given: > > [...] > > Am I missing something obvious? I am using Windows 2000 and Ruby v. > > 1.8.1-11 > > Nope. Your code works fine for me w/ your data. > > > 504 % ruby -v > > ruby 1.8.2 (2005-01-13) [powerpc-darwin7.7.0] > > and the library seems pretty stable: > > > revision 1.10 > > date: 2004/05/26 14:30:29; author: nahi; state: Exp; lines: +83 -64 > > BUT... Line 228 for me is not anywhere near initialize (it is in > CSV.parse_row). I'd make sure you aren't seeing some weird version skew > or something worse. Thanks. The Line 228 thing was really throwing me off as well. I found that parse_line works: IO.foreach("data.csv") {|f| p CSV::parse_line(f.chomp) } #used parse_line instead of parse Not sure what's up with the previous attempts. I'll try it on another machine and see what happens. Thanks; -Jonathan