Rails不会在生产中的资产上附加缓存清除时间戳

问题描述 投票:2回答:1

我在资产管道中使用stylesheet_link_tag,但我得到了:

<link href="/assets/application.css" media="screen" rel="stylesheet" type="text/css" />

我的production.rb

config.serve_static_assets = false
config.assets.compress = true

我假设它是设置或简单的东西。

ruby-on-rails caching asset-pipeline
1个回答
6
投票

确保此设置为true:

# config/environments/production.rb
config.assets.digest = true

并且您已经运行过rake assets:precompile

© www.soinside.com 2019 - 2024. All rights reserved.