From 9d091c038d5e3d35be09fbd0fd1603e3a4035ac2 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 6 Oct 2011 16:22:40 +0200 Subject: revises the precompilation section of the asset pipeline guide (web server configuration for gzipped assets pending) --- railties/guides/source/asset_pipeline.textile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 7795b297f3..7c79b202f1 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -398,7 +398,7 @@ This can be changed with the +config.assets.manifest+ option. A fully specified config.assets.manifest = '/path/to/some/other/location' -NOTE: If there are missing precompiled files in production you will get an AssetNoPrecompiledError exception indicating the name of the missing file(s). +NOTE: If there are missing precompiled files in production you will get an Sprockets::Helpers::RailsHelper:: AssetPaths::AssetNotPrecompiledError exception indicating the name of the missing file(s). h5. Server Configuration @@ -436,9 +436,9 @@ location ~ ^/assets/ { } -When files are precompiled, Sprockets also creates a "Gzip":http://en.wikipedia.org/wiki/Gzip (.gz) version of your assets. This avoids the server having to do this for any requests; it can simply read the compressed files from disk. You must configure your server to use gzip compression and serve the compressed assets that will be stored in the +public/assets+ folder. The following configuration options can be used: +When files are precompiled, Sprockets also creates a "gzipped":http://en.wikipedia.org/wiki/Gzip (.gz) version of your assets. Web servers are typically configured to use a moderate compression ratio as a compromise, but since precompilation happens once Sprockets uses the maximum compression ratio, thus reducing the size of the data transfer to the minimum. One the other hand, web servers can be configured to serve compressed content directly from disk, rather than deflating non-compressed files themselves. -For Apache: +A possible configuration for Apache could be: -- cgit v1.2.3