Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Need to ignore tmp/cache when precompiling locally #3014

Closed
rhulse opened this Issue · 0 comments

2 participants

@rhulse

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

@josevalim josevalim closed this in 63f6fad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.