title: Compressing assets in Ruby on Rails 3
body: <p>I have following configurations in production.rb</p>
  
  <pre><code> # Disable Rails's static asset server (Apache or nginx will already do this)
    config.serve_static_assets = false
  
    # Compress JavaScripts and CSS
    config.assets.compress = true
  
    # Choose the compressors to use
    config.assets.js_compressor  = :uglifier
    config.assets.css_compressor = :yui
  
    # Don't fallback to assets pipeline if a precompiled asset is missed
    config.assets.compile = true
  
    # Generate digests for assets URLs.
    config.assets.digest = true
  </code></pre>
  
  <p>But when the ruby on rails application on production server I get following error:</p>
  
  <pre><code>Error compiling CSS asset
  
  LoadError: cannot load such file -- yui-compressor
  </code></pre>
  
  <p>on commenting line <code>LoadError: cannot load such file -- yui-compressor</code>,everything goes well.<br/>
  All I need a compressor that gzip compress assets before sending to improve performance!<br/>so,what is problem here or is there any other alternative?</p>
  
  <p><br/><br/>
  <b>Update:</b><br/> Also javascript compression is not working,as yslow plugin for firefox also showing javascripts needs to be compressed.</p>