Search code examples
ruby-on-railsgzipmongrelwebrick

How to enable output compression (gzip) on everything that goes out of my Ruby on rails on Mongrel/WEBrick Server?


I am not sure this is the right place to ask this question, as answer to this may be coding solution or a config solution :) any way,

I am using ruby 1.8.7 and rails 2.3.11 running on the Mongrel server. How do i enable the gzip compression on everything (views, data, JS, CSS etc.) that goes out of this server?

I tried google, and most responses say use apache:P but i donot have access to any other web server. There are no straight answers as to how to get webrick to do this.

Can anyone help me?

thanks


Solution

  • You should be able to do this using the Mongrel GZipFilter.