Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Need to ignore tmp/cache when precompiling locally #3014
I changed compressors to Google Closure to get around issue #2537 with uglifier reordering my files.
I tested the precompilation on my development machine. Rails forces env to production in this case.
After precompiling the generated JS did not reflect the change in compressor.
It appear that Sprockets is using the cache in tmp during static compilation instead of what is in the config and assets folder. On a dev machine tmp this is unlikely to be cleared out; in production (with Capistrano) you get a new tmp folder with each deploy.
On a local dev machine this could create issues for people who have to precompile locally if they change compressors (or some other change that the cache will ignore).
Anyway, it doesn't seem like a good idea to use the cache if it exists when precompiling - it will cause unexpected results, which in my case has wasted 2 hours this morning.
A config change (such as changing the compressor) should Just Work.