开发者

JS and CSS files won't compress

开发者 https://www.devze.com 2023-04-03 05:25 出处:网络
I\'m trying to compress my CSS and JS files in a Rails 3.1 application, without success. The files won\'t get compressed.

I'm trying to compress my CSS and JS files in a Rails 3.1 application, without success.

The files won't get compressed.

Here is my production.rb file.

config.cache_classes                     = true
config.consider_all_requests_local       = false
config.action_controller.perform_caching = true
config.serve_static_assets               = false
config.assets.compress                   = true
config.assets.compile                    = true
config.assets.js_compressor              = :closure
config.assets.css_compressor             = :yui
config.i18n.fallbacks                    = true
config.active_support.deprecation        = :notify
config.as开发者_如何学Pythonsets.digest                     = true

I've also tried to run rake assets:precompile without success.

Anyone knows what the problem may be?


Found the source to the problem. I had (for some reason) a manifest file inside the public dir that told the browser to fetch a non compress file.

0

精彩评论

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