I am having some serious problems with rubygems and I can’t figure out
if the problem is with my machine or rubygems itself.
Using ubuntu and rvm…
gem install bundler
ERROR: While executing gem … (NoMethodError)
undefined method `spec’ for nil:NilClass
$gem install rspec
ERROR: While executing gem … (Zlib::DataError)
incorrect header check
I have all the libraries installed (zlib-dev etc) so I am utterly
baffled as to what is going on.
Tim_U
September 11, 2011, 5:04pm
2
It is typical for distributions to cripple packages.
There is no “zlib-dev” per se. Zlib is a whole package, and
distributions cripple it for no valid reason whatsoever in the year
2011. (My hdd has 300 GB, I never need crippled packages.)
http://www.zlib.net/zlib-1.2.5.tar.gz
I just tried to install rspec:
gem install rspec
Fetching: rspec-core-2.6.4.gem (100%)
Fetching: diff-lcs-1.1.3.gem (100%)
Fetching: rspec-expectations-2.6.0.gem (100%)
Fetching: rspec-mocks-2.6.0.gem (100%)
Fetching: rspec-2.6.0.gem (100%)
Successfully installed rspec-core-2.6.4
Successfully installed diff-lcs-1.1.3
Successfully installed rspec-expectations-2.6.0
Successfully installed rspec-mocks-2.6.0
Successfully installed rspec-2.6.0
5 gems installed
Installing ri documentation for rspec-core-2.6.4…
Installing ri documentation for diff-lcs-1.1.3…
Installing ri documentation for rspec-expectations-2.6.0…
Installing ri documentation for rspec-mocks-2.6.0…
Installing ri documentation for rspec-2.6.0…
Installing RDoc documentation for rspec-core-2.6.4…
Installing RDoc documentation for diff-lcs-1.1.3…
Installing RDoc documentation for rspec-expectations-2.6.0…
Installing RDoc documentation for rspec-mocks-2.6.0…
Installing RDoc documentation for rspec-2.6.0…
And it worked for me. I don’t have a crippled zlib though, as I compile
everything from source (using ruby scripts).
You should ask your distribution why it wants to kill your time by
crippling packages like zlib.
I do however have to say that something like:
“incorrect header check”
Is NOT a good error message.
So rubygems guys, make the error response better. What the heck is an
“incorrect header check”? Be more clear on that!
Tim_U
September 12, 2011, 1:34pm
3
“incorrect header check”? Be more clear on that!
’
Well something was severly screwed up with my system and re-installing
all the zlib* packages didn’t fix it. Luckily I was intending to
upgrade anyway so I upgraded and re-installed rvm and it worked. What
a pain though, wasted a whole lot of time.
I do agree that the error message is atrocious. Completely worthless.
Tim_U
September 12, 2011, 1:46pm
4
zlib-dev must be installed before ruby is installed or builded
otherwise it did not work