Skip to content

Instantly share code, notes, and snippets.

@vajradog
Created January 21, 2014 19:27
Show Gist options
  • Save vajradog/8546563 to your computer and use it in GitHub Desktop.
Save vajradog/8546563 to your computer and use it in GitHub Desktop.
Rack-zippy replaces the ActionDispatch::Static middleware used by Rails, which is not capable of serving the gzipped assets created by the rake assets:precompile task. rack-zippy will serve non-gzipped assets where they are not available or not supported by the requesting client.
gem 'rack-zippy'
bundle install
Add this line to config/application.rb
config.middleware.swap(ActionDispatch::Static, Rack::Zippy::AssetServer)
Push to Heroku and you’re done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment