Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rack-zippy

> 编程语言
Open source

Rack middleware for serving gzip files

158 stars0 likes0 views
WebsiteGitHub

About

Rack middleware for serving gzip files

Hey fellow Rails developers, please read!

Want to use rack-zippy with a Rails v4.2 or greater app?
Its recommended you don't! Rails 4.2+ now supports serving gzipped files directly so there's no need for rack-zippy in Rails 4.2+ apps.

Want to use rack-zippy with a Rails v4.1 or less app?
You'll need to use v3.0 of rack-zippy, see the README here: https://github.com/eliotsykes/rack-zippy/tree/v3.0.1

rack-zippy

rack-zippy v4+ is a Rack middleware for serving .gz files in Rack apps that are not Rails 4.2+ apps. (If you need to use rack-zippy in a Rails 'eliotsykes/rack-zippy', :branch => 'your-local-branch-name'

At the command line, inside your-app, configure bundler to set a local git repo to override the one we specified in the previous step for rack-zippy:

$> bundle config --local local.rack-zippy /path/to/your/local/rack-zippy

Now when you run your-app with bundle exec, the rack-zippy gem dependency will resolve to /path/to/your/local/rack-zippy.

Cleanup time! When you’re finished testing, delete the local override and set your Gemfile dependency back to the original:

# At the command line:
$> bundle config --delete local.rack-zippy

# In your-app/Gemfile change rack-zippy dependency to this (or similar):
gem 'rack-zippy', '~> 9.8.7' # Replace 9.8.7 with the rack-zippy release version you want to use.

How to Run a Single Test

bash
# Single test file
ruby -Ilib:test test/assert_server_test.rb

# Single test method
ruby -Ilib:test test/assert_server_test.rb --name test_serves_static_file_as_directory

# Test methods matching a regex
ruby -Ilib:test test/assert_server_test.rb --name /serves_static/

Contributors

  • Eliot Sykes https://eliotsykes.com
  • Kieran Topping https://github.com/ktopping
  • Luke Wendling https://github.com/lukewendling
  • Anton Petrunich https://github.com/solenko
  • ssemakov https://github.com/ssemakov
  • Kai Schlichting https://github.com/lacco

Releasing a new gem

  1. Update pre-release version to the release version in lib/rack-zippy/version.rb, e.g. 1.0.1.pre becomes 1.0.1
  2. Update CHANGELOG.md version and date. Update Contributors in README.md.
  3. Tests pass? (rake test)
  4. Commit and push changes to origin.
  5. Build the gem (rake build)
  6. Release on rubygems.org (rake release)
  7. Update version to the next pre-release version in lib/rack-zippy/version.rb, e.g. 1.0.1 becomes 1.0.2.pre.
  8. Add new heading to CHANGELOG for the next pre-release
  9. Commit and push the updated lib/rack-zippy/version.rb and CHANGELOG files.

Issues· 4 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言