kmurph79
kmurph79

Reputation: 1202

Serving GZipped files from s3 using the Asset Pipeline

I have a Rails 3.2.3 app on Heroku and I'm using the asset_sync gem to serve my assets from s3, via these instructions. It works great, except s3 is not serving up the gzipped css/js files (just the uncompressed version). I've enabled gzip compression, to no avail:

config.gzip_compression = true

According to Using GZIP with html pages served from Amazon S3 I need to add meta-data to the s3 object for uploading. How would I do this in concert with the Asset Pipeline? Thank you for any help.

Upvotes: 2

Views: 1663

Answers (1)

stereoscott
stereoscott

Reputation: 13436

Set up this environment variable on your heroku instance:

heroku config:add ASSET_SYNC_GZIP_COMPRESSION=true

You can see this option on the readme for asset_sync.

Upvotes: 3

Related Questions