Javascript features work on localhost but not when deployed to Heroku

前端 未结 8 1759
栀梦
栀梦 2020-12-01 17:57

I\'ve noticed that when I deploy to Heroku, javascript features dont work (such as Bootstrap Popover, Buttons, etc). I\'m working with rails 3.2.2, ruby 1.9.3. The features

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 18:41

    Checked the minified js for my app, and popover was twice in the file.

    Be sure that only one of bootstrap and boostrap-sprockets is declared in your javascript assets

    From the docs:

    bootstrap-sprockets and bootstrap should not both be included in application.js.

    bootstrap-sprockets provides individual Bootstrap Javascript files (alert.js or dropdown.js, for example), while bootstrap provides a concatenated file containing all Bootstrap Javascripts.

    Be sure that only one of bootstrap and bootstrap sprockets

    Refs: bootstrap-sass github issue and here.

提交回复
热议问题