Can write file via IRB, but not from actual controller...odd

i have my rails app hosted at (great folks) -- but im running
into an ODD issue...maybe someone can help.

if i go into IRB and type:"temp.txt", "w")

, everything goes well, and it creates the file in the same directory
that im in (in the controllers directory...bad, i know...but it works
for now)...

now, in my controller, i have the exact same thing....but it wont create
the file. no errors or just DOESNT create it...

ive chmod'd the directory to 777, but still to no avail...anyone got any

Why are we creating a file anyway? Shouldn't your data be stored in
the database. Although I know I would need to create files for things
like profile avatars, but I don't know about this. Don't forget to do
file.close() or something similar, perhaps it's not actually getting
written until you do that? Also, maybe it's being created in the /
public/ directory, because that's where the dispatch.cgi is running
your program.