10

When I try to install ZenTest:

gem install ZenTest

I get the following error:

Invalid gemspec in [C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

I tried cleaning up the gems and removing the ZenTest to no avail.

What's wrong?

Manuel
  • 10,869
  • 14
  • 55
  • 86
  • you should use Bundler to install gems. http://gembundler.com/ – Sean Xiao Jan 23 '13 at 20:30
  • 1
    Bundler gives the same error. I got the error after creating a new rails app. – Manuel Jan 23 '13 at 20:33
  • hmm, this error looks like version issue with "< 2.1, >= 1.8". The solution is probably changing Gemfile to give the correct version – Sean Xiao Jan 23 '13 at 20:55
  • also having the same issue, my Gemfile doesn't have any version string in the ZenTest gem, just "gem 'ZenTest'" – Jorge Sampayo Jan 23 '13 at 20:59
  • I'm with Jorge here, the gemfile doesn't specify any version. – Manuel Jan 23 '13 at 21:04
  • try adding the version and bundle install. Something like gem "ZenTest", "1.8" – Sean Xiao Jan 23 '13 at 21:07
  • It works with v4.8.3 so I'm going to use that. v4.8.4 has been out for a month so I doubt it's broken and nobody has raised the issue. If anyone has an answer I'd like to know. – Manuel Jan 23 '13 at 21:24
  • I've just spoken with Ryan Davis, the author of ZenTest. He tells me that this is due to a bug in RubyGems and they're preparing a release that fixes it. In the meantime, downgrade to 4.8.3. – bleything Jan 23 '13 at 21:44
  • How to downgrade it to 4.8.3 now i have 4.9.2 – Charan Pai Jul 09 '13 at 09:18

3 Answers3

15

I've just spoken with Ryan Davis, the author of ZenTest. He tells me that this is due to a bug in RubyGems and they're preparing a release that fixes it.

In the meantime, downgrade to 4.8.3.

bleything
  • 351
  • 2
  • 2
  • Update your gemfile: gem 'ZenTest', '4.8.3' then bundle update – Manuel Jul 09 '13 at 17:54
  • As an alternative, you can downgrade your rubygems http://stackoverflow.com/questions/523993/how-do-you-downgrade-rubygems/29618803#29618803 – Donato May 23 '15 at 20:27
3

Updating rubygems to 1.8.25 seems to fix the problem (https://github.com/seattlerb/zentest/issues/28)

1

to cleanup the gem, move the gemspec file to some other location.

e.g: in ubuntu to cleanup the gem, do

sudo mv /var/lib/gems/1.8/specifications/ZenTest-4.8.4.gemspec /var/tmp/
Arivarasan L
  • 9,538
  • 2
  • 37
  • 47