Ember rc.5 is not working properly with Handlebars 1.0.0?


#1

Hello everyone! I just started my first Ember app and had some problems. So i got latest versions of Ember and Handlebars. But Ember shows an error:

Uncaught Error: assertion failed: Ember Handlebars requires Handlebars version 1.0.0-rc.4, COMPILER_REVISION expected: 3, got: 4 – Please note: Builds of master may have other COMPILER_REVISION values. ember-1.0.0-rc.5.js:52

So i tried to change COMPILER_REVISION in handlebars.js to 3 and everything seemed to work untill i tried to use {{outlet}}. When i did so i got new error message not from Handlebars about error when using ‘replace’ method.

I got evething working by switching from Handlebars 1.0.0 to 1.0.0-rc.4. Just letting you know :slight_smile: Thanks!


#2

Hacky solution, but I guess you’ve got to. I hope there aren’t major differences between handlebars RCs, or else you could run into some serious problems later, I’d think. I assume they’re working on actually fixing this soon. Hope so.

Edit: The files in the starterkit appear to work perfectly.


#3

I’m having some similar issues. Using Ember-Rails, and setting the ember-source version to 1.0.0.rc5, which grabs Handlebars 1.0.0.rc4, and then I get the message:

Uncaught Error: assertion failed: Ember Handlebars requires Handlebars version 1.0.0-rc.3, COMPILER_REVISION 2. Builds of master may have other COMPILER_REVISION values.

Had the same problem when I tried to get Ember rc4, but I just rolled back to rc3, because I didn’t have time to fight with it.

edit: Looks like something in my pipeline broke and my ember.js is still rc3.


#4

I seem to run into this issue anytime Ember or Handlebars gets a version bump and there doesn’t really seem to be a good way to hunt down specific versions of Handlebars - right now I install Handlebars with Bower, which seems to give me the correct version most of the time.

Since Ember and Handlebars are so tightly integrated, it would be nice if we could get a table with links to download specific version-pairings of each. Just a suggestion.


#5

Hey, sorry about this. You’re right that there is an incompatibility between the code generated by Handlebars 1.0.0 and what Ember.js is expecting.

We should have this fixed by the next Ember release, but the workaround in the short term is to use Handlebars RC4. Now that Handlebars is at a 1.0, these kind of compatibility problems should be a thing of the past.


#8

@tom any idea as to when a next RC will be released or when master will require 1.0.0?

Using Handlebars RC4 is not always so straight forward. E.g. it can cause some issues when using grunt-contrib-handlebars, which relies on the merge method and is not present in RC 4.


#9

It looks like the version numbers for the handlebars-source gem have gotten a bit out of order, which may be making it tricky to upgrade the dependency in Ember.


#10

OK so Ember RC6 has been released but it is still using Handlebars RC4 in the starter kit.

I tried EmRC6 with Hbars 1.0 and it is the same.

Assertion failed: Ember Handlebars requires Handlebars version 1.0.0-rc.4, COMPILER_REVISION expected: 3, got: 4 – Please note: Builds of master may have other COMPILER_REVISION values. ember.js:361


#11

I’ve got the same issue as Brendan. Is there a fix for this or a workaround. All was fine until I started to add {{each controller}}…{{title} … {{/each}}


#12

As of 4023186 ember works with 1.0.0 handlebars so you will need to jump on master (or cherry pick that commit)


#13

Is this available in RC 6.1?