You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
ref: https://github.com/sstephenson/sprockets/issues/195
The text was updated successfully, but these errors were encountered: