Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZenTest gem doesn't install due to invalid gemspec file #30

Closed
gregors opened this issue Feb 7, 2013 · 9 comments
Closed

ZenTest gem doesn't install due to invalid gemspec file #30

gregors opened this issue Feb 7, 2013 · 9 comments

Comments

@gregors
Copy link

gregors commented Feb 7, 2013

$ gem install ZenTest

Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Successfully installed ZenTest-4.8.4
1 gem installed
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Installing ri documentation for ZenTest-4.8.4...
Installing RDoc documentation for ZenTest-4.8.4...

$ autotest
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
/home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find ZenTest (>= 0) amongst [bundler-1.2.3, rake-10.0.3, rubygems-bundler-1.1.0, rvm-1.11.3.6] (Gem::LoadError) from /home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:into_spec'
from /home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in gem' from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/autotest:18:in

'
from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in eval' from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in'

@zenspider
Copy link
Member

This is a dupe of #29

% gem update --system
% gem uninstall ZenTest
% gem install ZenTest

@gregors
Copy link
Author

gregors commented Feb 7, 2013

Thanks!

@zerolith
Copy link

Had the same with 4.9.0 - got fixed by this:

% gem update --system
% gem uninstall ZenTest
% gem install ZenTest

as reported by zenspider

@brandondrew
Copy link

For whatever reason, I couldn't uninstall ZenTest (maybe because I upgraded RubyGems first?) without getting the same error message about an illformed requirement. The solution was to manually edit the gemspec, and then (mostly to verify that RubyGems is working properly) uninstall and reinstall:

% vim $GEM_HOME/specifications/ZenTest-4.9.0.gemspec  # assumes you're using RVM
    # add ", " to line 7
% gem uninstall ZenTest --force
% gem install ZenTest

@cis-shraddha
Copy link

i did all % gem update --system
% gem uninstall ZenTest
% gem install ZenTest
after that i m faceing the same prob

@charlesreid1
Copy link

Same problem here with my Homebrew ruby, I fixed it by editing:

/usr/local/lib/ruby/gems/2.0.0/specifications/ZenTest-4.9.5.gemspec

and changing the string on line 7:

"<3, >=1.8"

to

">=1.8"

@zenspider
Copy link
Member

@charlesreid1 as stated multiple times, this is not the proper solution

@charlesreid1
Copy link

If your solution is to run

% gem update --system
% gem uninstall ZenTest
% gem install ZenTest

then your solution did not work. The error message is thrown by gem, it's always thrown by gem, no matter what command you run. Only way to fix it is using a non-gem command.

@alokamme
Copy link

alokamme commented Jun 2, 2014

If you are using Ruby 1.9 kindly navigate to folder
/var/lib/gems/1.9.1/specifications
using command line with root login.
then issue command gedit ZenTest-4.10.0.gemspec.
Edit the line written as s.required_rubygems_version = Gem::Requirement.new("<3.0, >= 1.8") to
s.required_rubygems_version = Gem::Requirement.new(">= 1.8")
save it.
then again issue command sudo gem install GenTest.
it will install by displaying message as

"Invalid gemspec in [/var/lib/gems/1.9.1/specifications/ZenTest-4.10.0.gemspec]: Illformed requirement ["< 3.0, >= 1.8"]
Successfully installed ZenTest-4.10.0
1 gem installed
Invalid gemspec in [/var/lib/gems/1.9.1/specifications/ZenTest-4.10.0.gemspec]: Illformed requirement ["< 3.0, >= 1.8"]
Installing ri documentation for ZenTest-4.10.0...
Installing RDoc documentation for ZenTest-4.10.0..."

but will install and work.
you can check it in your local gem list by using "gem list" command

@seattlerb seattlerb locked and limited conversation to collaborators Jan 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants