ActionView::Template::Error (No space left on device @ dir_s_mkdir)

I have a small application that runs on Heroku and it has worked for many years…

Now for the first time, without any apparent reason, I got a single 500 error with this message:

ActionView::Template::Error (No space left on device @ dir_s_mkdir - /app/tmp/cache/C61/E91):

It was just one failed request, then everything worked normally. I don’t know why.

Is there any way to prevent errors like that in the future?

This is because of some reasons you are creating data in tmp so you have to clean that You can use rm -rf tmp this will resove this issue