title: JS files not loading on all pages in Rails 4
body: <p>I'm currently working on a project where I used an app that has been already built. I'm actually just upgrading that one. Now, the app has a lot of javascript files. Most of them are located in vendor/assets/javascripts and some in app/assets/javascripts. For the app, that works fine. For the pages I make, it just doesn't work! I.e. I created a new model where I have the date as a field. Now I wanted to use the datepicker which is located in vendor/assets/javascripts. It loads on the other page, but on my projects/new jquery is missing, datapicker is missing... It doesn't recognize the funcions.</p>
  <p>application.js looks like this</p>
  <pre><code>//= require jquery/jquery-3.1.1.min.js
  //= require bootstrap-sprockets
  //= require metisMenu/jquery.metisMenu.js
  //= require pace/pace.min.js
  //= require peity/jquery.peity.min.js
  //= require slimscroll/jquery.slimscroll.min.js
  //= require inspinia.js
  </code></pre>
  <p>On the pages where the js work, they work flawlessly and they are not added on those specific pages. They are included somehow through the app.</p>
  <p>application.html.erb</p>
  <pre><code>&lt;!-- Include style per-controller - vendor plugins --&gt;
      &lt;%= stylesheet_link_tag params[:controller] if ::Rails.application.assets.find_asset(&quot;#{params[:controller]}.css&quot;) %&gt;
  
      &lt;!-- Main css styles --&gt;
      &lt;%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt;
  
      &lt;!-- Main javascript files --&gt;
      &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;
      &lt;%= csrf_meta_tags %&gt;
  </code></pre>
  <p>Any idea?</p>