This gem is does not work in Rails4 since the Rack::Lock middleware is removed.
My suggested fix is to use app.config.middleware.use instead of app.config.middleware.insert_after ::Rack::Lock.