更新时间:2023-09-29 15:10:28
在Heroku上,您必须在config/application.rb中设置此行:
On Heroku, you must set this line in your config/application.rb:
config.assets.initialize_on_precompile = false
http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets >
为了更快地进行资产预编译,您可以部分加载应用程序 通过将config.assets.initialize_on_precompile设置为false config/application.rb,尽管在这种情况下模板看不到 应用程序对象或方法. Heroku要求它为假.
For faster asset precompiles, you can partially load your application by setting config.assets.initialize_on_precompile to false in config/application.rb, though in that case templates cannot see application objects or methods. Heroku requires this to be false.