未捕获的错误:如果没有加载模板编译器,则无法调用`compile`。 请在调用`compile`之前加载`ember-template-compiler.js`

我是ember.js框架的新手,并在rails和ember.debug.js -v 1.10.1(最新版本)上使用ruby。 我一直在网上看到ember改变了这个最新的补丁但我无法弄清楚如何解决我的问题:

Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`. 

有人可以请我指点让我的编译器正常运行吗? 我希望我知道我的项目中的代码片段有助于确定答案……

这篇文章可以帮助你:

http://emberjs.com/blog/2015/02/05/compiling-templates-in-1-10-0.html

如果你没有使用ember-cli – 你的HTML应该是这样的:

   

如果您使用的是ember-cli,那么您的模板应该是预编译的,您不应该遇到这个问题。

我们需要在我们的应用程序中包含ember-template-compiler.js。 我认为ember-rails默认不包括这个。

在app / assets / javascripts / application.js中添加此项

//= require ember-template-compiler