Skip to content

Commit 9d091c0

Browse files
committed
revises the precompilation section of the asset pipeline guide (web server configuration for gzipped assets pending)
1 parent 89623e9 commit 9d091c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: railties/guides/source/asset_pipeline.textile

+3-3
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ This can be changed with the +config.assets.manifest+ option. A fully specified
398398
config.assets.manifest = '/path/to/some/other/location'
399399
</erb>
400400

401-
NOTE: If there are missing precompiled files in production you will get an <tt>AssetNoPrecompiledError</tt> exception indicating the name of the missing file(s).
401+
NOTE: If there are missing precompiled files in production you will get an <tt>Sprockets::Helpers::RailsHelper:: AssetPaths::AssetNotPrecompiledError</tt> exception indicating the name of the missing file(s).
402402

403403
h5. Server Configuration
404404

@@ -436,9 +436,9 @@ location ~ ^/assets/ {
436436
}
437437
</plain>
438438

439-
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:
439+
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.
440440

441-
For Apache:
441+
A possible configuration for Apache could be:
442442

443443
<plain>
444444
<LocationMatch "^/assets/.*$">

0 commit comments

Comments
 (0)