In my case, jQuery loaded twice because of the line //= require_tree .
To prevent this error in application.js and application.css, I use app/assets/javascript/autorequire to create a subdirectory, and instead require_tree . I am doing require_tree ./autorequire .
So the files in app/assets/javascript and app/assets/stylesheets not included automatically / by accident. I put all my personal .css and .js files in a subdirectory, and they are included implicitly. But I can determine which files from the top path should be included and in what order.
Since I am doing this, I have never had problems with assets that were not loaded as I expect.
Nockenfell Aug 09 '13 at 18:55 2013-08-09 18:55
source share