Dropdown menus work on localhost or Heroku, but not both depending on order in application.js
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require angular
//= require 'leaflet.js'
//= require leaflet
//= require_tree .
With the above dropdown menus work on Heroku https://secure-shore-68966.herokuapp.com/summary. To work on localhost bootstrap needs to be second, that is, above jquery_ujs.
This an old problem, e.g., Javascript features work on localhost but not when deployed to Heroku. I found the order solution in one of the comments. (The post is four years old, so the items differ a bit.)
production.rb file has config.assets.compile = true
which I assume takes care of precompiling, but in any case I've tried rake assets:precompile
before pushing to Heroku and that didn't help.
What might I have wrong? Or is there a workaround so I don't have to change application.js everytime I upload? I'm a newbie so my knowledge of asset management is weak to say the least.