title: how to deploy ember-cli + rails app on heroku
body: <p>I am trying to deploy an Ember-cli app by copying the files generated by ember build into the rails public folder following the approach shown in:</p>
  
  <pre><code>   http://blog.abuiles.com/blog/2014/05/21/deploying-ember-cli-and-rails-to-heroku/
  
     https://github.com/dockyard/ember-cli-plus-backend/tree/rails-served-html/frontend/app
  </code></pre>
  
  <p>But it doesn't seem to work <strong><a href="https://embercli.herokuapp.com/" rel="nofollow">as shown in the app on heroku</a></strong>, rather than display the content, it displays raw json on the web page which suggests the emberjs route model hook is not being called when you enter the app via url. The JSON it displays is something like this:</p>
  
  <pre><code> [{"id":1,"name":"james","presentation_ids":[1,2]},{"id":2,"name":"charle","presentation_ids":[3]}]}
  </code></pre>
  
  <p>However, if I leave the <strong>index.html</strong> file generated by ember-build in the <strong>rails app/public folder</strong> instead of copying the content of the index.html to rails layout/application.html.erb, the content of the ember-cli app's application.hbs will display correctly but if I directly load any route in the browser, it will again return a raw json rather than display the content.</p>