开发者

rails caching problem with css

开发者 https://www.devze.com 2023-01-18 23:11 出处:网络
I have two different css files... style.css and style_main.css both are used separately in d开发者_运维知识库ifferent layouts for the same application. In development mode everything works fine, but

I have two different css files... style.css and style_main.css

both are used separately in d开发者_运维知识库ifferent layouts for the same application. In development mode everything works fine, but when in production mode, caching happens and both css files are loaded as all.css?xxxxxxx but unfortunately all.css is made from style.css and does not update with the change in layout. how do i prevent this???


When you deploy the code to the production server, you are probably also deploying the all.css file. Have you tried excluding this file from your version control system? When you update style.css etc on your development machine, commit the changes and then redeploy, rails will re-generate all.css if it finds that it isn't already in the public folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号