Forum: Ruby on Rails Writing to a file (newbie)

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.
Jeff C. (Guest)
on 2006-01-10 09:16
Hi all,

I'm really new to RoR, and I was playing around with it and it's pretty
awesome.  I've been looking around and I can't seem to find a correct
way to open/create a file and write data to it.

I was wondering if someone could show me or point me in the right
direction.

1) Create and/or open an external file
2) Write to it and close it out

Basically, I want to be able to write to an html file on my webserver
and append things to it so I can include it in another file.  For my
purposes I don't need to go directly from the database.  The examples
I've searched for on this site seem to be for development on an offline
system, so I don't know where arguments like the root path and such go.
Any help would be appreciate!  Thanks.
This topic is locked and can not be replied to.