In my Delayed Job, I tried to create a file to tmp folder
file_path = Rails.root.join('tmp', "#{file_name}." + file_extension);
exported_file = kit.to_pdf
# Save file to disk
File.open(file_path, 'wb') do |file|
file << exported_file
end
It works well in local but on Heroku there is a error in Delayed Job "No such file or directory - /app/tmp/test.pdf"
So how I can solve this problem. I do not want to store file in S3. Thank you