title: jQuery Plugins and the Rails 3 Asset Pipeline -- What am i doing wrong?
body: <p>I'm working on a web app in Rails 3.1, fully (I think) utilizing the asset pipeline for css, images, and js. I'm running into a pretty consistent issue when I try to implement jQuery plugins. I've been able to solve it in one case, but not in another, and I'm trying to figure out what the key issue is.</p>
  
  <p>Essentially, I'll load a jQuery plugin and then call it in my <code>document.ready</code> method, only to find that pulling up the site results in (for example, in the case of the jScrollPane plugin)</p>
  
  <pre><code> Uncaught TypeError: Object #&lt;Object&gt; has no method 'jScrollPane'
  </code></pre>
  
  <p>I have received the same error for several other plugins. I thought the case might be that jQuery/jQuery-UI wasn't being loaded before my plugins, so they weren't instantiated properly, but that doesn't seem to be the case. The necessary scripts are in <code>app/assets/javascripts/...</code> In my <code>app/assets/application.js</code> I have the following:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require jquery-ui
  //= require jquery.mousewheel
  //= require mwheelIntent
  //= require jquery.jscrollpane.min
  //= require_tree .
  </code></pre>
  
  <p>The resultant <code>application.js</code> appears to be correct, other than the errors; that is, everything I would expect to be there is there. </p>
  
  <p>What am I doing wrong? I'm happy to provide any additional information necessary.</p>