title: Compiling handlebar templates into Rails
body: <p>As I am working to get ember running I am now failing to get my handlebar templates to load through asset pipeline. 
  I'm using the handlebars_assets gem, and when I hit the server I get what is below, I verified that the path is correct, but not really sure how to fix this. 
  When I require handlebars.runtime:</p>
  
  <pre><code>couldn't find file 'handlebars.runtime'
    (in /Users/tspore/Rails/Active/tombfinder/app/assets/javascripts/app/ember_app.js:1)
  
  Cache read: sprockets/6f42a4ba0f2b80167ce50f9f306427fa
  Compiled app/ember_app.js  (5ms)  (pid 9791)
  Cache read: sprockets/764613d8100bb6d8e6072701f79183c1
  Completed 500 Internal Server Error in 141ms
  
  ActionView::Template::Error (can't convert nil into String
    (in /Users/tspore/Rails/Active/tombfinder/app/assets/javascripts/app/templates/records/index.hbs)):
      26:   &lt;% end %&gt;
      27: 
      28: 
      29:   &lt;%= javascript_include_tag 'app/ember_app' %&gt;
      30: &lt;/head&gt;
      31: &lt;body class="&lt;%= @class %&gt;"&gt;
      32: &lt;div id="center"&gt;
    app/views/layouts/js.html.erb:29:in `_app_views_layouts_js_html_erb__854441834177334479_70351597254240'
    app/controllers/js/js_controller.rb:3:in `index'
  
  Rendered /Users/tspore/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.1.10/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
  Rendered /Users/tspore/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.1.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.6ms)
  Rendered /Users/tspore/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.1.10/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (3.0ms)
  </code></pre>
  
  <p>EDIT: After using Github version, and removing the gem from the :assets  - it seems to work. But now I am getting this error - </p>
  
  <p>Uncaught ReferenceError: HandlebarsTemplates is not defined records_view.js:4
  Uncaught Error: assertion failed: Unable to find view at path 'App.listRecordsView' </p>
  
  <p>My application looks like this - </p>
  
  <pre><code>App.listRecordsView = Ember.View.extend({
     templateName: HandlebarsTemplates['records/index'](context)
  });
  </code></pre>
  
  <p>with the ember-rails gem I got the gem to compile so now I have a script called layout.js which looks like this: </p>
  
  <pre><code>Ember.TEMPLATES["app/templates/controller/layout"] = Ember.Handlebars.template(function anonymous(Handlebars, depth0, helpers, partials, data) { helpers = helpers || Ember.Handlebars.helpers; data = data || {};
    var buffer = '', stack1, hashTypes, escapeExpression=this.escapeExpression;    
    data.buffer.push("&lt;h1&gt;from template&lt;/h1&gt;\n");
    stack1 = {};
    hashTypes = {};
    stack1 = helpers._triageMustache.call(depth0, "outlet", {hash:stack1,contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data});
    data.buffer.push(escapeExpression(stack1) + "\n");
    return buffer;
  });
  </code></pre>
  
  <p>How do I call this template in the Ember App?  It has no name space to say: 
  templateName: 'layout' </p>