3

I've previously added ZenTest to my gemfile to get autotest to run. On this occasion I get the following error four times over:

saasbook@saasbook:~/Documents/github/LocalSupport$ bundle exec autotest
Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

I've searched on this error and found a number of discussions in the github repo for ZenTest:

https://github.com/seattlerb/zentest/issues/29 https://github.com/seattlerb/zentest/issues/32 https://github.com/seattlerb/zentest/issues/33

I've followed some of the advice there, uninstalled and re-installing ZenTest, but no joy. I'm on ubuntu running ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

My entire app is available here:

https://github.com/tansaku/LocalSupport

so for example you can check out my GemFile:

https://github.com/tansaku/LocalSupport/blob/master/Gemfile

Any ideas?

Many thanks in advance

Sam Joseph
  • 4,584
  • 4
  • 31
  • 47

2 Answers2

8

Just fixed this by editing

/usr/local/lib/ruby/gems/1.9.1/specifications/ZenTest-4.9.0.gemspec

so that the line specifying the rubygems version is now this:

 s.required_rubygems_version = Gem::Requirement.new("< 2.1") if s.respond_to? :required_rubygems_version=

now everything runs fine ...

Sam Joseph
  • 4,584
  • 4
  • 31
  • 47
  • a more stable fix appears to be: "upgrade rubygems, uninstall zentest and reinstall zentest." seems to have worked for me on at least one system – Sam Joseph May 20 '13 at 09:09
1

Upgrading rubygems and reinstalling the ZenTest (according to what Sam wrote) solved my problem but it causes me another problem:

/Users/neo/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.2.3/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError)

Anything I want to do, from running the autotest to starting rails server, it gives me that error. After searching a bit I found this page. It seems that the latest version of rubygems has some bugs, so you should not upgrade it to the latest version, instead upgrade it to a stabler version like 1.8.24 .

Community
  • 1
  • 1
NEO
  • 2,145
  • 2
  • 26
  • 34