Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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...

like image 740
Jesse Robinson Avatar asked Oct 19 '22 16:10

Jesse Robinson


2 Answers

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.

like image 136
jmurphyau Avatar answered Oct 22 '22 09:10

jmurphyau


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

like image 25
Rajasegar Avatar answered Oct 22 '22 08:10

Rajasegar