$ Is Not Defined, Uncaught Referenceerror While Using Select2 Plugin With Rails
I'm trying to use the Select2 plugin to add a search bar to my select box. I get the following error when looking at the page console : Uncaught ReferenceError: $ is not defined
Solution 1:
dont use //= require_tree
if you already include all you scripts manualy. this can be the cause of errors. remove this string and try to reload page
p.s i also think what you are using incorrect sintax
//= require_tree
correct version contain dot
//= require_tree .
p.p.s. not about your main question, but you are using old version of ruby. check the newer
one more important thing what i didn't mentiond before. you are using defer="defer"
attribute for deffering main script loading. inline javascript what you type on page loaded BEFORE main scripts
Post a Comment for "$ Is Not Defined, Uncaught Referenceerror While Using Select2 Plugin With Rails"