title: Rails App - Uncaught ReferenceError: $ is not defined
body: <p>I am new to Ruby on Rails and I am looking to include a simple script in my view (not in a separate file ) I have an inline script in my view as follows ( simplified for question )</p>
  
  <pre><code>&lt;script&gt;
    console.log("got here...");  // works fine 
    $(document).ready(function() { // throws error
      console.log("got here...");  // doesnt print 
    });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I am receiving the following error </p>
  
  <pre><code>Uncaught ReferenceError: $ is not defined
  </code></pre>
  
  <p>Here is where jquery is included in my application.js file  </p>
  
  <pre><code>//= require rails-ujs
  //= require jquery
  //= require jquery_ujs
  //= require turbolinks
  //= require highcharts
  //= require chartkick
  //= require bootstrap-sprockets
  </code></pre>
  
  <p>This is included in my Gemfile ( above bootstrap , which seemed to be a common cause on other threads )</p>
  
  <pre><code>gem 'jquery-rails'
  </code></pre>
  
  <p>What am I missing?</p>