Pergunta

I'm upgrading to Ember rc5 from rc3, but I'm getting 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.4) or downgrade your runtime to an older version (== 1.0.0-rc.3)

Here are the relevant lines in my gemfile, taken straight from the ember-rails README (except pulling the gem from git... it gives the same error whether I include that or not)

gem 'ember-rails', git: 'https://github.com/emberjs/ember-rails.git'
gem 'ember-source', '1.0.0.rc5'
gem 'handlebars-source', '1.0.0.rc4'

I'm using rails 3.2

I know this problem has come up before, but none of the solutions I've found have made a difference. Things that haven't worked:

  • deleting precompiled assets
  • rake tmp:clear
  • making sure my javascrcipt load order is jquery, then handlebars, then ember
  • restarting the server
  • threatening the compiler
  • giving up hope and watching Buffy reruns
  • trying all of those in conjunction, in every imaginable order

Simple and definitive answers are best, of course, but I'd also be glad for hints on what I can study to figure this out on my own. I don't know where to start.

Foi útil?

Solução

For now, ensure your Gemfile is using the edge version:

gem 'ember-rails', :git => 'git://github.com/emberjs/ember-rails.git'
gem 'ember-source', '1.0.0.rc5'
gem 'handlebars-source', '1.0.0.rc4'

A new version of the gem should be released to resolve the issue soon. This fixed the problem for me.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top