Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing Heroku from using precompiled assets in development mode

Currently it seems Heroku is determined to pre-compile assets when I push my code up to my instances.

This is great for production servers, however for my "RAILS_ENV=development" server, this causes issues, as I now get pages with all the JavaScript files served up individually from my asset manifest, and then another file with the same code all grouped up as the pre-compiled asset.

This cause my jquery datatables libraries to break, throwing popup errors, which I don't get on my local environment (development or production) or in my production Heroku instance.

Is there anyway to disable pre-compilation of assets on Heroku for development mode instances ? Or is there any reason why these aren't already disabled on development Heroku servers already ?

like image 926
Phantomwhale Avatar asked Dec 06 '25 12:12

Phantomwhale


1 Answers

If Heroku detect a public/assets/manifest.yml file then they will not attempt to precompile your assets and assume you are dealing with them yourself. More details at http://devcenter.heroku.com/articles/rails31_heroku_cedar

like image 123
John Beynon Avatar answered Dec 09 '25 20:12

John Beynon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!