Forum: Ruby Problem writing a text file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
31fdda5f38fc6df4e193cfb7445ddc5a?d=identicon&s=25 RichardOnRails (Guest)
on 2009-03-24 04:20
(Received via mailing list)
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
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-03-24 05:00
(Received via mailing list)
On Mon, Mar 23, 2009 at 8:16 PM, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:

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

> Does anybody see any obvious (or subtle) error?

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,
31fdda5f38fc6df4e193cfb7445ddc5a?d=identicon&s=25 RichardOnRails (Guest)
on 2009-03-24 06:25
(Received via mailing list)
On Mar 23, 11:56 pm, Hassan Schroeder <hassan.schroe...@gmail.com>
wrote:
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com

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
This topic is locked and can not be replied to.