Compressing assets in Ruby on Rails 3

痞子三分冷 提交于 2019-12-04 06:58:44

Have you included the yui-compressor gem in your Gemfile? If not, then include it, run 'bundle install', and then Rails should be able to find it.

I found that the compression must be enabled on webserver to have effect.
All that is needed is to add following:

AddOutputFilterByType DEFLATE text/html text/css application/x-javascript application/javascript

in <VirtualHost *:80></VirtualHost> directive for Apache(phusion passenger) for my case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!