0

I am using a javascript plugin which requires the dom to be loaded before use. So I am loading all javascript files on applications.js except from the one file that I load dynamically with the javascript_include_tag, this works fine on localhost but when I push to heroku it doesn't find the file. Should I precompile the assets in order for this to work ?

Petran
  • 7,677
  • 22
  • 65
  • 104
  • When pushing to heroku, one of the automatic steps that gets run is assets:precompile. To reproduce the issue locally, run your app in production mode: `rake assets:precompile` (and) `RAILS_ENV=production rails server` – changingrainbows Dec 22 '13 at 18:47
  • possible duplicate of [Asset pipeline: use javascript files for only one controller](http://stackoverflow.com/questions/19899542/asset-pipeline-use-javascript-files-for-only-one-controller) – phoet Dec 22 '13 at 21:12
  • I think you need to add that file to `config.assets.precompile` – phoet Dec 22 '13 at 21:13

0 Answers0