title: jQuery UI Autocomplete throws Uncaught TypeError: Object has no method 'autocomplete'
body: <p>I'm trying to introduce the jQuery UI autocomplete feature to a widget in a Rails 3.1.3 app. It doesn't do anything and on inspecting the scripts in Chrome developer tools, I see the following:</p>
  
  <pre><code>jQuery(function() {
    return $("#location").autocomplete({
      locations.js:3 Uncaught TypeError: Object #&lt;Object&gt; has no method 'autocomplete'
      source: ["foo", "food", "four"]
    });
  });
  </code></pre>
  
  <p>I've included jQuery UI in application.js:</p>
  
  <pre><code>//= require jquery
  //= require jquery-ui
  //= require jquery_ujs
  //= require_tree .
  </code></pre>
  
  <p>My coffeescript has the following:</p>
  
  <pre><code>jQuery -&gt;
    $('#location').autocomplete
      source: ["foo", "food", "four"]
  </code></pre>
  
  <p>What am I missing!?</p>