Ruby on rails Heroku资产管道是';t查找Handlebar.runtime.js
在清单文件中,我们有Ruby on rails Heroku资产管道是';t查找Handlebar.runtime.js,ruby-on-rails,heroku,asset-pipeline,handlebars.js,Ruby On Rails,Heroku,Asset Pipeline,Handlebars.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'
//= 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上编译时也没有任何错误。
关于如何让它正常工作有什么想法吗?看起来rails没有在文件名的末尾添加
.js
。尝试添加它 看起来rails没有将.js
添加到文件名的末尾。尝试添加它 您需要在环境文件(即development.rb、production.rb)中配置ember变量。如果不进行配置,则在Rails环境为开发时,使用的Ember版本默认为开发,生产时也是如此
来源:您需要在环境文件(即development.rb、production.rb)中配置ember变量。如果不进行配置,则在Rails环境为开发时,使用的Ember版本默认为开发,生产时也是如此
来源:我相信你已经解决了。然而,对于其他遇到这个问题的人,请检查:我相信你已经解决了这个问题。但是,对于遇到此线程的其他人,请查看: