3

How can I clear the cache on Heroku?

I've tried heroku run rails c + Rails.cache.clear and receive the following error

Errno::ENOENT: No such file or directory @ dir_initialize - /app/tmp/cache/

I also tried heroku run rake tmp:clear (from this post). The task runs but when I go back into the console and run Rails.cache, nothing has changed.

How can I clear the cache?

Community
  • 1
  • 1
user2954587
  • 4,661
  • 6
  • 43
  • 101

1 Answers1

4

Did you try this? (This works with Celadon Cedar with the Heroku Toolbelt package at least)

heroku run --app YOUR_APP_NAME rails runner Rails.cache.clear

Update

If the above does not work, try running:

heroku run rake tmp:create
heroku run rake tmp:clear
K M Rakibul Islam
  • 33,760
  • 12
  • 89
  • 110