title: Uncaught TypeError: undefined is not a function rails3/backbone/js
body: <p>I just started delving into javascript to make project more responsive and I am working through a backbone.js example.</p>
  
  <p>I've replicated <a href="http://www.jamesyu.org/2011/01/27/cloudedit-a-backbone-js-tutorial-by-example/">http://www.jamesyu.org/2011/01/27/cloudedit-a-backbone-js-tutorial-by-example/</a> in a new Rails 3 project.</p>
  
  <p>I run the project and go to the home page .... and there is a link there to /# and nothing else. Looking into the js console I get errors on two scripts: application.js and backbone.js</p>
  
  <p>This (backbone.js)</p>
  
  <pre><code>backbone-min-0-3-3.js:8Uncaught TypeError: Cannot call method 'extend' of undefined
  </code></pre>
  
  <p>and this (application.js): </p>
  
  <pre><code>var App = {
          Views: {},
          Controllers: {},
          Collections: {},
          init: function() {
  
          new App.Controllers.Fffforms();
  **error message ---&gt; application.js:9Uncaught TypeError: undefined is not a function**
              Backbone.history.start();
          }
  };
  </code></pre>
  
  <p>Being new to js, this doesn't exactly make sense and nothing I've looked up has been all that helpful in the short term.</p>
  
  <p>Can anyone tell me what exactly these errors would indicate and how I can go about following up? Everything checks out comparing the resources in 
  <a href="https://github.com/jamesyu/CloudEdit">https://github.com/jamesyu/CloudEdit</a>, but my replication from a new rails 3 project (not a clone of that repo) doesn't exactly work.</p>
  
  <p>Any suggestions appreciated, bearing in mind I've just embarked on learning some javascript.</p>
  
  <p>EDIT:</p>
  
  <p>By suggestion, I went and actually added in the Jammit gem and configured it to serve all the js scripts, which the default Rails all was not. Now all the scripts are going to the browser (controller included). Unfortunately, this doesn't solve the original issue, only giving more errors on load, flowing from the App init which is this in the chrome js console:</p>
  
  <pre><code>Uncaught TypeError: undefined is not a function
  App.initapplication.js:9
  (anonymous function):3000/#new:32
  d.extend._Deferred.f.resolveWithjquery.min.js:16
  d.d.extend.readyjquery.min.js:16
  d.c.addEventListener.yjquery.min.js:16
  </code></pre>
  
  <p>Given I'm just copying right now, there must be some small overlooked detail beyond me atm that is preventing App from initiating properly. </p>