admin管理员组

文章数量:1357707

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?

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?

Share Improve this question asked May 19, 2013 at 10:27 thomastutsthomastuts 3,5493 gold badges22 silver badges28 bronze badges 1
  • This PR (github./emberjs/ember.js/pull/2695) is maybe going to fix this problem, but not sure if and wenn it gets merged in – intuitivepixel Commented May 19, 2013 at 11:31
Add a ment  | 

4 Answers 4

Reset to default 9

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

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

For bower.json (or ponent.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.

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

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.

本文标签: javascriptLatest EmberJS doesn39t recognize latest HandlebarsStack Overflow