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 ?

3
  • 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 Commented Dec 22, 2013 at 18:47
  • possible duplicate of Asset pipeline: use javascript files for only one controller Commented Dec 22, 2013 at 21:12
  • I think you need to add that file to config.assets.precompile Commented Dec 22, 2013 at 21:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.