title: How to modify Rails middleware to serve gzip assets from Heroku?
body: <p>My question is closely related to "<a href="https://stackoverflow.com/questions/12326191/any-way-to-serve-gzip-assets-from-heroku">any way to serve gzip assests from Heroku</a>"</p>
  
  <p>The best approach points to a Gist: <a href="https://gist.github.com/2152663" rel="nofollow noreferrer">https://gist.github.com/2152663</a> 
  So, how do I make it work? It seems obvious for the person who asked, but I'm having a hard time putting it together.</p>
  
  <p>I understand I have to place <code>compressed_static_assets.rb</code> into <strong>/lib</strong> and then reference it from my <code>production.rb</code>, but I keep getting the error: <strong>"uninitialized constant Middleware (NameError)"</strong></p>