【问题标题】:Rake assets:precompile fails with: couldn't find file 'handlebars'耙资产:预编译失败:找不到文件“车把”
【发布时间】:2013-07-27 22:05:51
【问题描述】:

在 capistrano 部署期间运行命令:

bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile

返回

rake aborted!
couldn't find file 'handlebars'
(in */app/assets/javascripts/application.js:22)
*/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:102:in `resolve'
*/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:142:in `require_asset'
*************
Tasks: TOP => assets:precompile:all

Gem ember-rails 在我的 Gemfile 中处于全局范围内,我正在使用 handlebars-source (1.0.12)、ember-rails (0.12.0)、ember-source (1.0.0.rc6.2) Rails 3.2.12 和 ruby​​ 1.9.3。 可能值得注意的是,这在生产中有效,但在暂存部署中无效。

我的 staging.rb 中还有以下内容,这似乎是常见问题。

config.ember.variant = :production

【问题讨论】:

    标签: ember.js rake capistrano sprockets handlebars.js


    【解决方案1】:

    原来我已经添加了这一行

    config.ember.variant = :development
    

    到一个没有被推送到 master 的版本。将 config.ember.variant = :development 添加到当前版本修复了这个问题。

    【讨论】:

      猜你喜欢
      • 2013-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多