title: bxslider-rails "TypeError: $(...).bxSlider is not a function"
body: <p>Ok... So I'm using the bxslider-rails plugin (which apparently nobody else is using because I haven't seen any other questions here about it) and I'm getting the above TypeError.  I've updated to the latest versions of jquery-rails and coffee-rails.  Jquery seems to be loaded fine and it doesn't seem to be loaded anywhere else in the application.</p>
  
  <p>Here is my layout file:</p>
  
  <p>application.html.erb</p>
  
  <pre><code>  &lt;%= stylesheet_link_tag    "application", :media =&gt; "all" %&gt;
          &lt;%= javascript_include_tag "application" %&gt;
  
  &lt;style&gt;
  .bxslider {
    height: auto;
    width: 640px;
    background-color: #c41230;
    background-size: cover;
    position: relative;
    border: 1px solid red;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>Here is my application.js:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require bxslider
  //= require_tree .
  </code></pre>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;div class="pix" style="float: left;" &gt;
  &lt;ul class="bxslider"&gt;
  &lt;% @dailies.order("created_at desc").limit(2).each do |feat| %&gt;
  
  &lt;li&gt;
  &lt;%= link_to(image_tag(feat.fphoto.url(:large), :alt =&gt; feat.title, :title =&gt; "Click here to learn more about liquid.radio"), feat) %&gt; 
  &lt;/li&gt;
  &lt;% end %&gt;
  &lt;/ul&gt;
  
  &lt;script type="text/JavaScript"&gt;
          $(document).ready(function(){
              $('.bxslider').bxSlider({
                  infiniteLoop: false,
                  hideControlOnEnd: true
              });
          });
      &lt;/script&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And finally the respective gem versions:</p>
  
  <p>Using jquery-rails 4.0.5
  Using jquery-ui-rails 5.0.3
  Using coffee-rails 4.1.0
  Using bxslider-rails 4.2.5.1</p>
  
  <p>This is all under Rails 4.2.4</p>
  
  <p>I've tried absolutely everything I could think of, and everything I read everywhere says that this should be working... but it is not.  I get the TypeError and one image stacked on top of the other.</p>
  
  <p>It's also worth nothing that if I check the debugger  jquery.bxslider is fine but I also get a bxslider.js which is blank.</p>
  
  <p>As a sidenote I also get a TyperError saying that ActiveAdmin's "perPage" is not a function.</p>
  
  <p>Any help would be appreciated and this is in the development environment.</p>