ruby on rails - bootstrap-datepicker throws jQuery not defined -
i'm trying use bootstrap-datepicker on rails 4.2. after following instructions datepicker doesn't work , following error in javascript console.
uncaught referenceerror: jquery not defined
line raising error bootstrap-datetimepicker.js first line reference error thrown.
// neither amd nor commonjs used. use global variables. if (!jquery) { throw 'bootstrap-datetimepicker requires jquery loaded first'; } if (!moment) { throw 'bootstrap-datetimepicker requires moment.js loaded first'; }
application.js file
//= require jquery //= require jquery_ujs //= require turbolinks //= require bootstrap-sprockets //= require moment //= require bootstrap-datetimepicker //= require_tree . $(function() { $('.datepicker').data({behaviour: "datepicker"}).datepicker(); });
any ideas what's causing this? looks jquery isn't loading though it's placed above bootstrap-datetimepicker.js
it looks should have worked, take here: https://github.com/trevors/bs3dp-test/
are able run app successfully? if not, issue gem. difference see between application.js , https://github.com/trevors/bs3dp-test/blob/master/app/assets/javascripts/application.js have moment required before bootstrap-sprockets