$ 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 Searching different questions here led me to believe this error happens because the jQuery javascript is not included or put before the script is called. But I still could not find a way to make it work. How can I fix this error and make the select2 plugin work? Here is the application.js file : //= require jquery //=