More Rails Speed with asset_packager Plugin
asset_packager original plugin is for.
Asset Packager Plugin with YUI Compressor
asset_packager is a great plugin. It has a couple of issues:
- It has a bug: it mangles CSS with multiline comments.
I have modified the
The YUI compressor provides some serious savings:
jsmin.rbRuby compressor: 41K
prototype.jscompressed with YUI compressor: 33K
- A java run time environment should be installed on the server. If it is not available the asset_packager will still function but won't use the YUI compressor.
Until the official version includes the changes to support the YUI compressor you will have to use my fork.
./script/plugin install git://github.com/eandrejko/asset_packager.git
config/asset_packages.yml configuration file with
In your layout file use:
When your application is in the production environment all of the files will be automatically merged and compressed.
Use the Google version
Most browsers make at most two simultaneous connections to each web server. If you place the following in your application layout file:
prototype from the