2012-06-15 20 views
2

在manifest文件中,我們有Heroku的資產流水線沒有發現handlebars.runtime.js

//= require handlebars.runtime 

在發展它工作正常,但在Heroku上我們得到一個錯誤。

ActionView::Template::Error (couldn't find file 'handlebars.runtime' 

    (in /app/app/assets/javascripts/application.js:11)): 
    1: = javascript_include_tag 'application' 
    2: = javascript_include_tag "#{params[:controller]}/#{params[:action]}" if js_file_exists?("#{params[:controller]}/#{params[:action]}") 
    3:  
    4: -# Append your own using content_for :javascripts 
    app/views/layouts/_javascripts.html.haml:1:in `_app_views_layouts__javascripts_html_haml__1848877102237238272_50436400' 
    app/views/layouts/landing.html.haml:35:in `block in _app_views_layouts_landing_html_haml__157312279246923607_45507260' 
    app/views/layouts/landing.html.haml:3:in `_app_views_layouts_landing_html_haml__157312279246923607_45507260' 

我們不是預編譯,我們沒有得到有關在Heroku編譯任何錯誤。 關於如何正確工作的任何想法?

+0

我相信你已經解決了它。但是,對於其他遇到此線程的人,請查看:[Heroku無法在我的Ruby on Rails應用程序中找到文件 - 即使它們在那裏?](http://stackoverflow.com/a/11088726/615434) – rdamborsky

回答

0

看起來像rails不會將.js添加到文件名的末尾。嘗試添加它。

0

您需要在環境文件(即development.rb,production.rb)中配置ember變體。如果你沒有配置它,那麼當Rails環境是開發時,Ember的版本默認使用開發,而對於生產環境也是如此。

來源:https://github.com/emberjs/ember-rails