ZenTest 4.9.3 shows as invalid gemspec

2.9k views Asked by At

I keep getting this error when trying to run 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. Is there any way around this? Thanks!

Here is my 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'
1

There are 1 answers

5
Arpit Chauhan On BEST ANSWER

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. (It would be <1.8.25)

Till that version, RubyGems didn't roundtrip gemspecs properly and thus couldn't parse "< 2.1, >= 1.8" correctly.

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.