jquery rails Uncaught ReferenceError: jQuery is not defined code example
Example 1: reference error $ is not defined jquery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Example 2: jquery is not defined rails
//Try adding this to your config/webpack/environment.js
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery'
})
)