自动测试在红宝石轨道上的错误 [英] Error with autotest in ruby on rails

查看:118
本文介绍了自动测试在红宝石轨道上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行命令自动测试,这是我得到的错误。我正在关注哈特尔的书,并想知道是否发生了这种冲突,因为现在有了ZenTest或其他什么东西?我该如何解决这个错误。我是RoR的新手

  [/Users//.rvm/gems/ruby-1.9.2-p320@Gemspec中无效twitclone / specifications / ZenTest-4.8.4.gemspec]:符合要求[< 2.1,> = 1.8] 
[/Users//.rvm/gems/ruby-1.9.2- p320@twitclone/specifications/ZenTest-4.8.4.gemspec]:形式上的要求[< 2.1,> = 1.8]
/Users//.rvm/rubies/ruby-1.9.2-p320/ lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / dependency.rb:247:in`to_specs':在[abstract-1.0.0,actionmailer-3.2.8,actionmailer-3.2之间找不到ZenTest(> = 0) .8.rc1,actionmailer-3.0.1,actionmailer-3.0.0,actionpack-3.2.8,actionpack-3.2.8.rc1,actionpack-3.0.1,actionpack-3.0.0,activemodel-3.2.8,activemodel -3.2.8.rc1,activemodel-3.0.1,activemodel-3.0.0,activerecord-3.2.8,activerecord-3.2.8.rc1,activerecord-3.0.1,activerecord-3.0.0,activeresource-3.2.8 ,activeresource-3.2.8.rc1,activeresource-3.0.1,activeresource-3.0.0,activesupport-3.2.8,activesupport-3.2.8.rc1,activesupport-3.0.1,act ivesupport-3.0.0,addressable-2.3.2,arel-3.0.2,arel-1.0.1,autotest-4.4.6,builder-3.0.4,builder-3.0.3,builder-2.1.2,bundler- 1.2.1,bundler-1.2.0,bundler-1.0.22,coffee-rails-3.2.2,coffee-script-2.2.0,coffee-script-source-1.4.0,coffee-script-source-1.3。 3,diff-lcs-1.1.3,erubis-2.7.0,erubis-2.6.6,excon-0.16.2,execjs-1.4.0,heroku-2.31.2,heroku-api-0.3.5, 1.2.1,i18n-0.6.1,i18n-0.4.2,journey-1.0.4,jquery-rails-2.1.4,jquery-rails-2.1.2,json-1.7.5,launchy-2.1.2, mail-2.4.4,邮件-2.2.19,mime-types-1.19,multi_json-1.4.0,multi_json-1.3.6,netrc-0.7.7,polyglot-0.3.3,rack-1.4.1,rack- 1.2.5,rack-cache-1.2,rack-mount-0.6.14,rack-ssl-1.3.2,rack-test-0.6.2,rack-test-0.6.1,rack-test-0.5.7, rails-3.2.8,rails-3.2.8.rc1,rails-3.0.1,railties-3.2.8,railties-3.2.8.rc1,railties-3.0.1,railties-3.0.0,rake-10.0。 2,rake-0.9.2.2,rdoc-3.12,rest-client-1.6.7,rspec-2.12.0,rspec-core-2.12.1,rspec-expectations-2.12.0,rspec-mocks-2.12.0, rspec-rails-2.12.0,rubygems-bu ndler-1.1.0,rubyzip-0.9.9,rvm-1.11.3.5,sass-3.2.3,sass-3.2.1,sass-rails-3.2.5,sequel-3.20.0,sinatra-1.0,spork- 0.9.2,spork-0.9.0,sprocket-2.1.3,sqlite3-1.3.6,tap-0.3.24,thor-0.16.0,thor-0.14.6,tilt-1.3.3,treetop-1.4。 12,treetop-1.4.10,tzinfo-0.3.35,tzinfo-0.3.33,uglifier-1.3.0](Gem :: LoadError)
from /Users//.rvm/rubies/ruby-1.9。 2-p320 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / dependency.rb:256:在`to_spec'
from /Users//.rvm/rubies/ruby-1.9.2-p320/lib/ ruby / site_ruby / 1.9.1 / ruby​​gems.rb:1231:在`gem'
from /Users//.rvm/gems/ruby-1.9.2-p320@twitclone/bin/autotest:18:in` < main>'
from /Users//.rvm/gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in`eval'
from /Users//.rvm /gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in`< main>'

所以在答案提示后,我试着先卸载Zentest

  -MacBook-Pro:proto1 $ gem uninstall ZenTest-4.8.4 
Inval id gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]:Illformed requirements [<< 2.1,> = 1.8]
[/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]中的gemspec无效:形式化要求[ < 2.1,> = 1.8]
INFO:未安装gemZenTest-4.8.4

之后(尽管有错误信息,我安装了降级版)

  s-MacBook-Pro:proto1 $ gem install ZenTest --version= 4.8.3
[/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]中的gemspec无效:形式上的要求[< 2.1,> = 1.8]
[/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]中的gemspec无效:形式化要求[ < 2.1,> = 1.8]
提取:ZenTest-4.8.3.gem(100%)
[/Users//.rvm/gems/ruby-1.9.2-p320@Gemspec中无效twitclone / specifications / ZenTest-4.8.4.gemspec]:形式化要求[<< 2.1,> = 1.8]
已成功安装ZenTest-4.8.3
已安装gem
[/Users//.rvm/gems/ruby-1.9.2-p320中的gemspec无效@ twitclone / specifications / ZenTest-4.8.4.gemspec]:形式化要求[<< 2.1,> = 1.8]
为ZenTest-4.8.3安装ri文档...
为ZenTest-4.8.3 ...安装RDoc文档...



然后我运行自动测试,显示出来!

  s-MacBook-Pro:proto1 $ autotest 
[/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]中的gemspec无效:形式上的要求[< 2.1,> = 1.8]
[/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]中的gemspec无效:形式化要求[ < 2.1,> = 1.8]
loading autotest / rspec2

问题的新部分:



在我建议删除ZenTest gemspec文件后,我无法运行spork或rails服务器。我安装了ZenTest 4.8.3,但它显示了以下内容:

  $ spork 
使用RSpec
预加载Rails环境
无法找到ZenTest-4.8.4在任何来源中
运行`bundle install`来安装缺失的gem。


解决方案

要使用命令 autotest ,您必须安装 ZenTest gem。

我想你已经在你的系统中安装了 ZenTest 4.8.4 ,这个gem工作不正常。

所以你必须降级它删除所有与 ZenTest 4.8.4 相关的文件,然后使用 4.8.3 使用 4.8.3 命令



gem install ZenTest --version= 4.8 .3



我认为这会解决您的问题。

干杯..!


I ran the command autotest and this is the error I got . I am following Hartl's book and was wondering is this clash happening because rails now comes with ZenTest or something else ? How can I work past this error. I am new to RoR

Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
/Users//.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find ZenTest (>= 0) amongst [abstract-1.0.0, actionmailer-3.2.8, actionmailer-3.2.8.rc1, actionmailer-3.0.1, actionmailer-3.0.0, actionpack-3.2.8, actionpack-3.2.8.rc1, actionpack-3.0.1, actionpack-3.0.0, activemodel-3.2.8, activemodel-3.2.8.rc1, activemodel-3.0.1, activemodel-3.0.0, activerecord-3.2.8, activerecord-3.2.8.rc1, activerecord-3.0.1, activerecord-3.0.0, activeresource-3.2.8, activeresource-3.2.8.rc1, activeresource-3.0.1, activeresource-3.0.0, activesupport-3.2.8, activesupport-3.2.8.rc1, activesupport-3.0.1, activesupport-3.0.0, addressable-2.3.2, arel-3.0.2, arel-1.0.1, autotest-4.4.6, builder-3.0.4, builder-3.0.3, builder-2.1.2, bundler-1.2.1, bundler-1.2.0, bundler-1.0.22, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.4.0, coffee-script-source-1.3.3, diff-lcs-1.1.3, erubis-2.7.0, erubis-2.6.6, excon-0.16.2, execjs-1.4.0, heroku-2.31.2, heroku-api-0.3.5, hike-1.2.1, i18n-0.6.1, i18n-0.4.2, journey-1.0.4, jquery-rails-2.1.4, jquery-rails-2.1.2, json-1.7.5, launchy-2.1.2, mail-2.4.4, mail-2.2.19, mime-types-1.19, multi_json-1.4.0, multi_json-1.3.6, netrc-0.7.7, polyglot-0.3.3, rack-1.4.1, rack-1.2.5, rack-cache-1.2, rack-mount-0.6.14, rack-ssl-1.3.2, rack-test-0.6.2, rack-test-0.6.1, rack-test-0.5.7, rails-3.2.8, rails-3.2.8.rc1, rails-3.0.1, railties-3.2.8, railties-3.2.8.rc1, railties-3.0.1, railties-3.0.0, rake-10.0.2, rake-0.9.2.2, rdoc-3.12, rest-client-1.6.7, rspec-2.12.0, rspec-core-2.12.1, rspec-expectations-2.12.0, rspec-mocks-2.12.0, rspec-rails-2.12.0, rubygems-bundler-1.1.0, rubyzip-0.9.9, rvm-1.11.3.5, sass-3.2.3, sass-3.2.1, sass-rails-3.2.5, sequel-3.20.0, sinatra-1.0, spork-0.9.2, spork-0.9.0, sprockets-2.1.3, sqlite3-1.3.6, taps-0.3.24, thor-0.16.0, thor-0.14.6, tilt-1.3.3, treetop-1.4.12, treetop-1.4.10, tzinfo-0.3.35, tzinfo-0.3.33, uglifier-1.3.0] (Gem::LoadError)
from /Users//.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users//.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users//.rvm/gems/ruby-1.9.2-p320@twitclone/bin/autotest:18:in `<main>'
from /Users//.rvm/gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in `eval'
from /Users//.rvm/gems/ruby-1.9.2-p320@twitclone/bin/ruby_noexec_wrapper:14:in `<main>'

So after the answer suggested , I tried to uninstall Zentest first

-MacBook-Pro:proto1 $ gem uninstall ZenTest-4.8.4
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
INFO:  gem "ZenTest-4.8.4" is not installed

After this ( inspite of the error messages , I installed the downgrade version )

s-MacBook-Pro:proto1 $ gem install ZenTest --version "=4.8.3"
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Fetching: ZenTest-4.8.3.gem (100%)
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Successfully installed ZenTest-4.8.3
1 gem installed
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Installing ri documentation for ZenTest-4.8.3...
Installing RDoc documentation for ZenTest-4.8.3...

And then I run autotest with this showing up !

s-MacBook-Pro:proto1 $ autotest
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
loading autotest/rspec2

New part of the problem :

After I was suggested to delete ZenTest gemspec file , I cannot run spork or the rails server . I have installed ZenTest 4.8.3 but it's showing the following thing :

$ spork
Using RSpec
Preloading Rails environment
Could not find ZenTest-4.8.4 in any of the sources
Run `bundle install` to install missing gems.

解决方案

To use the command autotest you have to install the ZenTest gem.
I think you had installed ZenTest 4.8.4 in your system. this gem is not working properly.
So you have to downgrade it to 4.8.3. Remove all the the files related to ZenTest 4.8.4. then install 4.8.3 using the command

gem install ZenTest --version "=4.8.3"

I think this will solve you problem.

Cheers..!

这篇关于自动测试在红宝石轨道上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆