I am using Apache 2.2, Passenger 3..2, Rails 3.

I have handled to compress the css file by modifying the deflate.conf file. However, after i run the opera addon yslow, still it states the javascript files are uncompressed.

<IfModule mod_deflate.c>

          AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript application/x-javascript

</IfModule>

Above, I am using the 3 variants: "application/javascript text/javascript application/x-javascript" but no luck.

Here's the content from yslow:

Grade D on Compress components with gzip

You will find 3 plain text components that ought to be sent compressed

* http://myhost.dyndns.org:8080/javascripts/jquery-1.4.2.min.js?...

* http://myhost.dyndns.org:8080/javascripts/jquery.validate.min.js?...

* http://myhost.dyndns.org:8080/javascripts/rails.js?...

Jammit is definitely an industrial strength resource packaging library for Rails, supplying both CSS and JavaScript concatenation and compression that you would expect, in addition to YUI Compressor and Closure Compiler compatibility, ahead-of-time gzipping, built-in JavaScript template support, and optional Data-URI / MHTML image and font embedding.

http://documentcloud.github.com/jammit/

Presuming that you're using capistrano, give a deployment task that compresses our javascript files in-put on the development server.

Take a look: http://blog.jcoglan.com/2007/05/26/make-capistrano-compress-your-javascript-and-css-instantly/