【发布时间】:2013-09-27 09:50:06
【问题描述】:
我正在尝试使用 RAILS_ENV=production bundle exec rake assets:precompile 编译我的 Rails 应用程序资产,但这不会编译我的 AngularJS 资产,因此我的控制台会报告:
ActionController::RoutingError (No route matches [GET] "/assets/app/views/products/index.html"):
我的 AngularJS 资产位于“/assets/app/”下,因此我尝试通过在 production.rb 中添加以下内容来编译 angular 文件夹,但仍然无法正常工作。
config.assets.precompile += %w(app/* bootstrap/* datatable/* ....
我可以在这个路径下找到编译好的索引文件:
public/assets/app/views/products/index-2429bd0f8fc0762dcc075e51f0306c5b.html
有什么想法吗?
更新
还在生产中尝试过 config.serve_static_assets = false,但它会导致更多的资产丢失错误
谢谢
【问题讨论】:
标签: ruby-on-rails angularjs asset-pipeline