Writing to a file (newbie)

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.