Search code examples
rubyrubygemshamlsproutcore

Installing Sproutcore with RubyGems fails at the haml gem


I am trying to install sproutcore on a windows xp vm (virtualbox), for development, using RubyGems. When gems reaches haml-3.0.25.gem it stops with the error:

gem install sproutcore -V
...
ERROR:  While executing gem ... (Zlib::DataError)
invalid stored block lengths

I have tried both Ruby 1.8.7 and 1.9.2 as well as RubyGems 1.7.1 and 1.8.1. I tried downloading haml 3.1.1 with git and installing it manually, but the rake would not install. It said something about 'lib/haml' not found. The directory did exist.

Other gems install just fine under all the combinations I tried. I even tried installing it under my host OS (Win 7 32-bit), but it gave the same error. Installing haml by itself changes the error message only slightly:

gem install haml -V
...
ERROR:  While executing gem ... (Zlib::DataError)
invalid code lengths set

Zlib compresses and decompresses data streams from what I have read, so it sounds like the haml gem might be corrupt (although I doubt).

I am at my wits end and could find no helpful advice anywhere.


Solution

  • I was able to install SproutCore on Ruby 1.9.2:

    1. Install Ruby 1.9.2-p180
    2. gem install sproutcore --pre
    3. gem install eventmachine --pre
    4. gem uninstall thin
    5. gem install mongrel

    I needed to remove thin because starting sc-server ended with errors, SproutCore will use mongrel instead of thin.


    Update:

    I didn't mention that I use RubyGems 1.7.2 and I have installed DevKit and Cygwin.

    I removed all versions of SproutCore, Mongrel and Haml, then I typed:

    1. gem install sproutcore --pre, SproutCore v1.6.0.beta.1 was installed.
    2. eventmachine --pre, eventmachine (1.0.0.beta.3 x86-mingw32) was installed

    SproutCore works with this setup, using mongrel was not necessary.

    My configuration: sproutcore (1.6.0.beta.1), ruby 1.9.2p180, gem 1.7.2, thin (1.2.11 x86-mingw32), eventmachine (1.0.0.beta.3 x86-mingw32), haml (3.0.25), gcc version 4.5.0 (GCC)