8

I just installed Zentest 4.4.6 which includes autotest 4.4.6 and when I run autotest I get the following error:

gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError)

huh? it's like it reverted back to ruby without rails

Michael K Madison
  • 2,242
  • 3
  • 21
  • 35

3 Answers3

12

I don't know japanese, but looking at

http://d.hatena.ne.jp/hkj/20110724

I learned that you can make it work by changing line 226 from:

# hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ }

to

# hacky_discovery = true

This line was last modified in this commit: https://github.com/seattlerb/zentest/commit/b462a8f1dcc03528d91c77cabc15f8575d9c378c

This issue is reported here: https://github.com/seattlerb/zentest/issues/5

UPDATE: To solve this problem just upgrade your rubygems: gem update --system

UPDATE 2: ZenTest 4.6.1 solves this problem.

gdelfino
  • 11,053
  • 6
  • 44
  • 48
1

I had this problem and found it can be avoided by moving from rubygems 1.8.6 to 1.8.5

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Justin
  • 11
  • 1
0

I just played around with versions in the Gemfile until the problem went away. There is some weird incompatibility between testing components.

Michael K Madison
  • 2,242
  • 3
  • 21
  • 35