手柄预编译错误与Ember rc1 [英] Handlebars precompile version error with Ember rc1

查看:95
本文介绍了手柄预编译错误与Ember rc1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Ember升级到1.0.0-rc1会导致以下错误:

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

我还将我的 ember-rails gem升级到 0.9.2

I also upgraded my ember-rails gem to 0.9.2

如何解决这个错误?

推荐答案

这是由 barber gem,它正在使用句柄rc2进行模板预编译。 我已经提出了要求,它修复了它。如果你现在需要这个工作,你可以使用我的分支:)

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 :)

1)将以下内容添加到您的Gemfile中:

1) Add the following to your Gemfile:

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

2)清除您的tmp目录

2) Clear your tmp dir

rm -rf tmp

3)重新启动服务器

编辑:对于未来的读者来说,这些更改现在已经合并,所以使用官方回购的主分支工作。

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

这篇关于手柄预编译错误与Ember rc1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆