简体   繁体   English

ZenTest错误阻止自动测试运行

[英]ZenTest errors preventing autotest from running

I've previously added ZenTest to my gemfile to get autotest to run. 我之前已将ZenTest添加到我的gemfile中以运行自动测试。 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: 我搜索了这个错误,并在ZenTest的github repo中找到了一些讨论:

https://github.com/seattlerb/zentest/issues/29 https://github.com/seattlerb/zentest/issues/32 https://github.com/seattlerb/zentest/issues/33 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. 我已经遵循了一些建议,卸载并重新安装了ZenTest,但没有任何乐趣。 I'm on ubuntu running ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] 我在ubuntu上运行ruby 1.9.2p290(2011-07-09修订版32553)[i686-linux]

My entire app is available here: 我的整个应用程序都在这里:

https://github.com/tansaku/LocalSupport https://github.com/tansaku/LocalSupport

so for example you can check out my GemFile: 所以例如你可以看看我的GemFile:

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

Any ideas? 有任何想法吗?

Many thanks in advance 提前谢谢了

Just fixed this by editing 只需通过编辑修复此问题

/usr/local/lib/ruby/gems/1.9.1/specifications/ZenTest-4.9.0.gemspec /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: 所以指定rubygems版本的行现在是这样的:

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

now everything runs fine ... 现在一切都很好......

Upgrading rubygems and reinstalling the ZenTest (according to what Sam wrote) solved my problem but it causes me another problem: 升级rubygems并重新安装ZenTest(根据Sam写的内容)解决了我的问题,但它引起了另一个问题:

/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. 我想做的任何事情,从运行自动测试到启动rails服务器,它给了我这个错误。 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 . 似乎最新版本的rubygems有一些bug,因此你不应该将它升级到最新版本,而是将其升级到更稳定的版本,如1.8.24。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM