Creating a file and saving in public directory

try

      File.makedirs("#{RAILS_ROOT}/public/report")
      File.open("#{RAILS_ROOT}/public/report/waiting.adc", "w") { |
file>
file.write("hello world") }
    end

Hi Jeff,

I've changed the code to what you have suggested only it has not worked.
I can't seem to find anywhere on Google from searching a solution to
this.

Is there a better way of writing files to a directory?

Thank you for your help.