thomastuts
thomastuts

Reputation: 3539

Latest EmberJS doesn't recognize latest Handlebars

When I install both the latest EmberJS (1.0.0-rc.3) and the latest Handlebars (1.0.0-rc.4), I get an error in console when I visit the page:

Uncaught Error: assertion failed: Ember Handlebars requires Handlebars 1.0.0-rc.3
or greater. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file
before you link to Ember.

I get this error whenever I do a 'vanilla' install by downloading jQuery, Handlebars and EmberJS. I also get these errors when I generate a project with Yeoman (both generator-ember and generator-charcoal). Everything is up-to-date, I've already ran

npm update -g yo generator-ember generator-charcoal grunt-cli bower

with no updates found.

Has anyone experienced this issue before, and how did you solve it?

Upvotes: 4

Views: 2243

Answers (4)

gbabiars
gbabiars

Reputation: 575

To fix this using Bower and NPM, you need to roll back both packages to Handlebars 1.0.0-rc3 since the templates are precompiled in both the ember and charcoal generators by the grunt-ember-templates package. To do this, you need to update your bower.json (or component.json if you have not updated it) and the package.json.

For bower.json (or component.json), simply change the line with handlebars from "handlebars": "~1.0.0-rc.3" to "handlebars": "1.0.0-rc.3".

For package.json, change the grunt-ember-templates line from "grunt-ember-templates": "~0.4.4" to "grunt-ember-templates": "0.4.5".

You'll then need to run npm install and bower install to install the correct packages.

Upvotes: 0

Mentioum
Mentioum

Reputation: 91

This will be causing a lot of problems for people who are doing this while following the NetTuts tutorials as they use Bower and/or Yeoman.

Bower currently installs the 1.0.0-rc.4 version on Handlebars even if you specify the rc.3 version. Very frustrating to any new user who's just fiddling around and going through the tutorials.

You can download the rc3 version of Handlebars by going to the link below, right clicking and saving it as a javascript file (.js): https://raw.github.com/wycats/handlebars.js/1.0.0-rc.3/dist/handlebars.js

Replace the referenced script in the html file generated by yeoman or in the example ember.js project with the one above.

Upvotes: 9

Luke Melia
Luke Melia

Reputation: 8389

Use Handlebars 1.0.0-rc3 with Ember 1.0.0-rc3. With Ember master, and the next release of Ember, use Handlebars 1.0.0-rc4.

Upvotes: 0

Juan Jardim
Juan Jardim

Reputation: 2252

Probably we have to wait for the rc 4 of ember. In the library code there is a verification of what version you need in order to run ember rc 3.

Here you can find more information about this github

I hope this can help,

Juanitos

Upvotes: 0

Related Questions