paolochiodi / htmlcompressor

A work in progress port of google's htmlcompressor.jar
Other
150 stars 26 forks source link

NameError: uninitialized constant HtmlCompressor #31

Closed ghost closed 9 years ago

ghost commented 9 years ago

Following this guide (https://remino.net/rails-html-css-js-gzip-compression/) I got an error:

NameError: uninitialized constant HtmlCompressor remote: /tmp/build_bae5e5126f5adcb967c7086926599cf4/config/initializers/compression.rb:24:in `block in <top (required)>'

on Heroku.

Rails 4.2.1.

Why?

I have to install your Middleware? A gem?

ghost commented 9 years ago

You can close this. I fixed.

monteirobrena commented 9 years ago

Hi @ginolon, how you fixed this error? Thanks.

adekbadek commented 9 years ago

@monteirobrena I fixed this by adding the 'htmlcompressor' gem: https://rubygems.org/gems/htmlcompressor/versions/0.2.0 Also I run into problem with sass (https://github.com/paolochiodi/htmlcompressor/issues/24), but I didn't have any inline stylesheets so I just removed css compression from configuration Hope this helps!