Here's some more about using gzip with Rails!
From http://guides.rubyonrails.org/asset_pipeline.html:
4.1.2 GZip Compression
When files are precompiled, Sprockets also creates a gzipped (.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. On the other
hand, web servers can be configured to serve compressed content
directly from disk, rather than deflating non-compressed files
themselves.
Nginx is able to do this automatically enabling gzip_static:
location ~ ^/(assets)/ { root /path/to/public; gzip_static on; #
to serve pre-gzipped version expires max; add_header Cache-Control
public; } This directive is available if the core module that provides
this feature was compiled with the web server. Ubuntu packages, even
nginx-light have the module compiled. Otherwise, you may need to
perform a manual compilation:
./configure --with-http_gzip_static_module If you're compiling nginx
with Phusion Passenger you'll need to pass that option when prompted.
A robust configuration for Apache is possible but tricky; please
Google around. (Or help update this Guide if you have a good example
configuration for Apache.)
Also, the following may be of interest!
http://api.rubyonrails.org/classes/ActiveSupport/Gzip.html
Hope this helps!