title: Ember: DS Not Defined
body: <p>Just started learning Ember, following a few examples, and the very basic stuff fails on me.</p>
  
  <p>I'm getting <code>Uncaught ReferenceError: DS is not defined</code> in Chrome. </p>
  
  <p>I'm including Handlebars just before Ember.js</p>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Ember Test App&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/handlebars.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/ember.js"&gt;&lt;/script&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class="container"&gt;
        &lt;div class="row"&gt;
          &lt;div class="span8 offset2" id="app"&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
    &lt;script type="text/x-handlebars" data-template-name="application"&gt;
      &lt;h1&gt;Ember App&lt;/h1&gt;
      {{outlet}}
    &lt;/script&gt;
  
    &lt;script type="text/javascript" src="app.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>App.js</h2>
  
  <pre><code>window.App = Ember.Application.create({
    rootElement: $("#app")
  });
  
  App.Store = DS.Store.extend({
    revision: 11
  });
  </code></pre>
  
  <h1>Solved - TIP:</h1>
  
  <p>Ensure that ember-data is included after ember itself:</p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/handlebars.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/ember.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/ember-data.js"&gt;&lt;/script&gt;
  </code></pre>