My js.erb files are not being regenerated even when I restart the development server. Is there a way for me to force the asset pipeline to regenerate all of the javascript assets every time I restart the server?
If I change the actual .js.erb source file then it recompiles fine, but the code pulls from the database, reading seeded data that could change between server restarts.
Late call here, but having had this problem all over the place, and being REALLY annoyed by it, dug in a bit. Here's my solution:
On restarting your server, rm -rf tmp/cache/*
That will blow away the SCSS and other cached assets, and force a recompile.
You could run rake assets:clean
instead if you prefer or are using Rake to restart your server.
Obviously, doing this slows server restart by a bit, but may be worth it for the removal of this major pain point...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With