What is the best way to get a temporary directory with nothing in it using Ruby on Rails? I need the API to be cross-platform compatible. The stdlib tmpdir won\'t work.
require 'tmpdir' # not needed if you are loading Rails tmp_dir = File.join(Dir::tmpdir, "my_app_#{Time.now.to_i}_#{rand(100)}") Dir.mkdir(tmp_dir)
Works for me.