Problem writing a text file

R

RichardOnRails

Hi,

I imported some test data from Excel as a CSV file.
I massaged that data and tried to write it out as CSV text file.
However, no file was created on the file system.

I've put out a snippet of the relevant code and debugging output at
http://www.pastie.org/425055.

I'm running ruby 1.8.6 in WinXP-Pro/SP3.

Does anybody see any obvious (or subtle) error?

Thanks in Advance,
Richard
 
R

RichardOnRails

Quick glance: File.open('fn', 'w') -- you're opening a file named 'fn',
not the file with the name represented by the variable fn .

HTH,

Hi Hassan,

Once more, you've pulled my fat out of the fire. I apologize for
bothering people on this newsgroup with my stupidity.

Thank you very much for you help.

Best wishes,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top