I am running ruby 1.9.3p429 (2013-05-15) [i386-mingw32] on a Windows 8 machine. Since updating to Middleman 3.1 (I am using 3.1.2) any time I run middleman build
with the gem middleman-minify-html I get the following error (the values change depending on the page its trying to create):
Content-Length header was 35215, but should be 37540
Is there something I need to update or change to support version middleman 3.1 and middleman-minify-html?
Below is the full output include the error when running middleman build --verbose
:
== Activating: sprockets
== File Change: data/defaults_cn.yml
== File Change: data/defaults_en.yml
== File Change: data/_partials/email_settings.xlsm
== Reading: Local config
== Activating: i18n
== Activating: livereload
== Activating: edm_helpers
== Activating: inline_premailer
== Activating: inline_to_table
== Activating: deploy_preview
== Activating: litmus
== Activating: sendpreview
== Activating: minify_html
== Activating: relative_assets
== File Change: locales/cn.yml
== File Change: locales/en.yml
== File Change: locales/_partials/site_copy.xlsm
Loaded extensions:
== Extension: sprockets
== Extension: i18n
== Extension: livereload
== Extension: edm_helpers
== Extension: inline_premailer
== Extension: inline_to_table
== Extension: deploy_preview
== Extension: litmus
== Extension: sendpreview
== Extension: minify_html
== Extension: relative_assets
== Extension: frontmatter
== File Change: .gitattributes
== File Change: config.rb
== File Change: data/defaults_cn.yml
== File Change: data/defaults_en.yml
== File Change: data/_partials/email_settings.xlsm
== File Change: extensions/helpers.rb
== File Change: locales/cn.yml
== File Change: locales/en.yml
== File Change: locales/_partials/site_copy.xlsm
== File Change: patches/cssparser.rb
== File Change: patches/nokogiri.rb
== File Change: patches/premailer_media.rb
== File Change: README.md
== File Change: source/layouts/layout.haml
== File Change: source/localizable/cta_arrow.gif
== File Change: source/localizable/herobanner_cn.jpg
== File Change: source/localizable/herobanner_en.jpg
== File Change: source/localizable/index.html.haml
== File Change: source/localizable/index.txt.haml
== File Change: source/localizable/logo_cn.gif
== File Change: source/localizable/logo_en.gif
== Rebuilding resource list
== Prerendering CSS
== Checking for Compass sprites
== Building files
create build/en/herobanner_cn.jpg
identical build/cn/herobanner_en.jpg
identical build/en/herobanner_en.jpg
identical build/cn/herobanner_cn.jpg
identical build/cn/logo_cn.gif
create build/en/logo_cn.gif
create build/cn/logo_en.gif
identical build/en/logo_en.gif
== Request: /cn/index.html
== Finishing Request: cn/index.html (0.29s)
error build/cn/index.html
Content-Length header was 35215, but should be 37540
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:20:in `assert'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:631:in `verify_c
ontent_length'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:655:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/response.rb:36:in `initi
alize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/mock.rb:161:in `initiali
ze'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/mock_session.rb:32:
in `new'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/mock_session.rb:32:
in `request'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/test.rb:230:in `pro
cess_request'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/test.rb:57:in `get'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:138:in `render_to_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:280:in `block in execute!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:277:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:277:in `execute!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:199:in `invoke!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/actions.rb:95:in `actio
n'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli/
build.rb:64:in `build'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `i
nvoke_command'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli.
rb:77:in `method_missing'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `i
nvoke_command'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/lib/middleman-core/cli.
rb:22:in `start'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-core-3.1.2/bin/middleman:18:in `<t
op (required)>'
C:/Ruby193/bin/middleman:23:in `load'
C:/Ruby193/bin/middleman:23:in `<main>'
In my config.rb
I have:
activate :minify_html, remove_https_protocol: false, remove_http_protocol: false, remove_form_attributes: false, remove_link_attributes: true, remove_input_attributes: false
Gems included by the bundle:
* activesupport (3.2.12)
* addressable (2.3.4)
* bundler (1.3.1)
* chunky_png (1.2.8)
* coffee-script (2.2.0)
* coffee-script-source (1.6.2)
* compass (0.12.2)
* css_parser (1.3.4)
* dimensions (1.2.0)
* em-websocket (0.5.0)
* eventmachine (1.0.3)
* execjs (1.4.0)
* ffi (1.9.0)
* fssm (0.2.10)
* haml (4.0.3)
* hike (1.2.3)
* htmlentities (4.3.1)
* http_parser.rb (0.5.3)
* i18n (0.6.4)
* kramdown (1.0.2)
* listen (1.2.2)
* mail (2.5.4)
* middleman (3.1.2)
* middleman-core (3.1.2)
* middleman-livereload (3.1.0)
* middleman-more (3.1.2)
* middleman-sprockets (3.1.2)
* mime-types (1.23)
* mini_portile (0.5.0)
* multi_json (1.7.7)
* nokogiri (1.6.0)
* polyglot (0.3.3)
* premailer (1.7.3)
* rack (1.5.2)
* rack-livereload (0.3.15)
* rack-test (0.6.2)
* rb-fsevent (0.9.3)
* rb-inotify (0.9.0)
* rb-kqueue (0.2.0)
* sass (3.2.9)
* sprockets (2.10.0)
* sprockets-helpers (1.0.1)
* sprockets-sass (1.0.1)
* thor (0.18.1)
* tilt (1.3.7)
* treetop (1.4.14)
* uglifier (2.1.1)
* wdm (0.1.0)