Rails - Using Tempfile to write on Heroku?

Hello, I need to be able to write a temporary file for use during the
request only.

Locally I can use the following successfully:

        tempfile = File.open(a.original_filename,'w')
          paperclip stuff........

That works great, but not on Heroku... How can I do the above with
Heroku's restrictions: http://docs.heroku.com/constraints#read-only-filesystem

I'm not understanding how to translate the above into: `#{RAILS_ROOT}/

Thanks for any help you can provide here.