title: How to delete the temporary files automatically in ruby-rails?
body: <p>My Rails app has to process and generate PDF XFA files and send to the user/browser.
  Its working fine. But the issue is that before sending the file to the user, it creates 2 files in the rails tmp directory.</p>
  
  <p>If 10 requests come to the pdf_controller, the number of the temp files in the tmp directory will double and it will eat up the space.</p>
  
  <p>After searching around I thought that Sweeper will come to the rescue. But not much knowledge about Sweeper.</p>
  
  <p>So, can anyone plz suggest which way to go?</p>