How to clear Sprockets cache?

kidcapital picture kidcapital · Feb 12, 2012 · Viewed 9.2k times · Source

When a Sprockets object compilation fails (due to a syntax error in CoffeeScript or SASS), it cannot recompile after the error is fixed because it says "file is already required."

In order to get the Sprockets object to work, I have to destroy and re-create it. I was wondering if anyone knew if there was a way to tell the Sprocket object to internally reset itself as to not run into this issue.

Answer

Ross Allen picture Ross Allen · Nov 22, 2012

rake tmp:cache:clear deletes the temporary cache directory.