简体   繁体   English

ZenTest 4.9.3显示为无效的gemspec

[英]ZenTest 4.9.3 shows as invalid gemspec

I keep getting this error when trying to run ZenTest 尝试运行ZenTest时,我不断收到此错误

Invalid gemspec in [/usr/local/rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.3.gemspec]: Illformed requirement ["< 2.1, >= 1.8"].

I have tried removing the ZenTest 4.9.3 and gem instal ZenTest 4.8.3 but that version cannot be found in any repositories so it automatically installs ZenTest 4.9.3 which keeps having an error and hence I cant run spork or autotest. 我已经尝试删除ZenTest 4.9.3和gem安装ZenTest 4.8.3,但该版本无法在任何存储库中找到,因此它会自动安装ZenTest 4.9.3,这会导致错误,因此我无法运行spork或autotest。 Is there any way around this? 有没有办法解决? Thanks! 谢谢!

Here is my gemfile: 这是我的gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.11'
gem 'spork'
gem 'rspec-core'
gem 'autotest', '4.4.6'
gem 'autotest-rails', '4.1.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails'
  gem 'webrat'
  gem 'capybara'
  gem 'Zentest', '4.8.3'
end
group :production do
  gem 'pg'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

I had the same problem. 我有同样的问题。 After digging, I found the solution. 挖掘后,我找到了解决方案。 The problem is most likely to be with the version of RubyGems installed in your system. 问题最可能出在系统中安装的RubyGems版本中。 (It would be <1.8.25) (它将<1.8.25)

Till that version, RubyGems didn't roundtrip gemspecs properly and thus couldn't parse "< 2.1, >= 1.8" correctly. 直到那个版本,RubyGems 没有正确地往返于gemspecs ,因此无法正确解析“<2.1,> = 1.8”。

So, go through these steps: 所以,完成以下步骤:

gem uninstall ZenTest
gem update --system
gem install ZenTest

The problem should get solved and you should no longer receive the warnings. 问题应该解决,你不应再收到警告。

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

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