Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handlebars precompile version error with Ember rc1

Tags:

ember.js

Upgrading Ember to 1.0.0-rc1 results in the following error:

Uncaught Template was precompiled with an older version of Handlebars 
than the current runtime. Please update your precompiler to a newer 
version (>= 1.0.0-rc.3) or downgrade your runtime to an older version (<= 1.0.rc.2).

I am using a version of handlebars that should work according to the error message above:

DEBUG: Ember.VERSION : 1.0.0-rc.1 ember.js:339
DEBUG: Handlebars.VERSION : 1.0.0-rc.3 ember.js:339
DEBUG: jQuery.VERSION : 1.9.1

I also upgraded my ember-rails gem to 0.9.2

How do I get around this error?

like image 395
jefflab Avatar asked Dec 26 '22 09:12

jefflab


1 Answers

This was caused by barber gem which is using handlebars rc2 for template precompilation. I've made a pull request which fixes it. If you need this working now, you can just use my fork :)

Update: instructions for using darthdeus fork:

1) Add the following to your Gemfile:

gem "barber", :git => "git://github.com/darthdeus/barber.git", :branch => "update-handlebars-to-rc3"

2) Clear your tmp dir

rm -rf tmp

3) Restart your server

edit: for future readers the changes have been merged now, so using a master branch from the official repo should work.

like image 63
Jakub Arnold Avatar answered Dec 31 '22 09:12

Jakub Arnold