codeforamerica/ohana-web-search — pull request #426 by monfresh (2014-05-23 18:31:18+00:00)
Title: Insert Rack::Rewrite before Rack::Runtime, not Rack::Lock

In Rails 4, Rack::Lock is not present on production because thread safety is enabled by default. Attempting to push to Heroku while trying to insert middleware before Rack::Lock will yield this error:

No such middleware to insert before: Rack::Lock

Reference: https://github.com/jtrupiano/rack-rewrite#sample-usage-in-a-rails-app