Jesse Robinson
Jesse Robinson

Reputation: 71

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

im new to the ember.js framework and using ruby on rails and ember.debug.js -v 1.10.1(latest release). I have been reading online that ember changed this latest patch but i cant figure out how to fix my problem of:

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

Could someone please nudge me in the direction to getting my compiler to run properly? i wish i knew what code snippets from my project would help determine the answer...

Upvotes: 6

Views: 2776

Answers (2)

Rajasegar
Rajasegar

Reputation: 106

We need to include the ember-template-compiler.js in our application. I think ember-rails does not include this by default.

Add this in your app/assets/javascripts/application.js

//= require ember-template-compiler

Upvotes: 1

jmurphyau
jmurphyau

Reputation: 2309

This post may help you:

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

If you're not using ember-cli - your HTML should look something like this:

<script src="assets/ember-template-compiler.js"></script>
<script src="assets/ember.debug.js"></script>

If you are using ember-cli your templates should be precompiled and you shouldn't be having that problem.

Upvotes: 2

Related Questions