File manipulation

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

Btw, where is RoR root? Is that ‘public’?

On Jul 12, 2006, at 14:49, Pål Bergström wrote:

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

Btw, where is RoR root? Is that ‘public’?

Yes, to get a normalized absolute path:

File.expand_path(RAILS_ROOT)

– fxn

Pål Bergström wrote:

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

And what about file manipulation, creating a file (but maybe better in
the views folder)?

Pål Bergström wrote:

Pål Bergström wrote:

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

And what about file manipulation, creating a file (but maybe better in
the views folder)?

Think I understand it now. Found the answer in
http://corelib.rubyonrails.org/ using File class.

Pål Bergström wrote:

Pål Bergström wrote:

Pål Bergström wrote:

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

And what about file manipulation, creating a file (but maybe better in
the views folder)?

Think I understand it now. Found the answer in
http://corelib.rubyonrails.org/ using File class.

Didn’t work. Could someone explain how you create a file?

Pål Bergström wrote:

Pål Bergström wrote:

Pål Bergström wrote:

Pål Bergström wrote:

What are the possibilities of file manipulation in RoR? How do you
create a .html or .rhtml file with ruby to be placed in the public
folder, with custom content?

And what about file manipulation, creating a file (but maybe better in
the views folder)?

Think I understand it now. Found the answer in
http://corelib.rubyonrails.org/ using File class.

Didn’t work. Could someone explain how you create a file?

Now it did. Worked when I used “w” instead of “r” in
File.new(“name”,“w”)