-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Gemspec corrupted in 1.0.4 #136
Comments
After I installed cucumber-1.0.4 I get this anytime ruby gems is loaded. Invalid gemspec in [/gems/ruby-1.8.7-p352/specifications/cucumber-1.0.4.gemspec]: Illformed requirement ["#YAML::Syck::DefaultKey:0x104dda680 0.8.4"] |
I see this issue as well, on mri 1.9.2 and rubygems 1.8.10 |
I'm also getting this on JRuby 1.6.4 and rubygems 1.8.10. |
I have the same issue with Ruby 1.9.2p180 rubygems 1.8.10. when I run "bundle install", the error messages are: Installing cucumber (1.0.4) Invalid gemspec in [/Users/ndgiang84/.rvm/gems/ruby-1.9.2-p180/specifications/cucumber-1.0.4.gemspec]: Illformed requirement ["#<Syck::DefaultKey:0x000001051123c0> 0.8.4"]
Invalid gemspec in [/Users/ndgiang84/.rvm/gems/ruby-1.9.2-p180/specifications/cucumber-rails-1.0.3.gemspec]: Illformed requirement ["#<Syck::DefaultKey:0x00000100ce58a0> 0.7.2"]
Installing cucumber-rails (1.0.3) Invalid gemspec in [/Users/ndgiang84/.rvm/gems/ruby-1.9.2-p180/specifications/cucumber-1.0.4.gemspec]: Illformed requirement ["#<Syck::DefaultKey:0x000001051123c0> 0.8.4"]
Invalid gemspec in [/Users/ndgiang84/.rvm/gems/ruby-1.9.2-p180/specifications/cucumber-rails-1.0.3.gemspec]: Illformed requirement ["#<Syck::DefaultKey:0x00000103fabf78> 0.7.2"] |
Also worth noting, if you inspect the gemspec file, it contains:
as one of the dependency versions. Is this a cucumber gem spec issue, or a bundler issue? |
Also for those who are having this problem, manually removing the gemspec file and linking against the github repo like so:
Seems to resolve the problem |
Seeing this too, it probably is the same problem as already occured in gherkin and was fixed in cucumber/gherkin@9d0cd89 |
I can confirm that this is a regression since 1.0.3. However... I revisited the StackOverflow question and there's a link to this very informative blog post: http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html. Apparently this is a problem with rubygems.org using Syck not Psyck. The advice on StackOverflow is to run I'm leaving this issue open for the time being as it appears to be a useful landing pad for those experiencing this issue! |
I've got a slightly different error message with JRuby 1.6.4 and RubyGems 1.5.1 (RVM jruby installation), but also resolved it by installing Cucumber 1.0.3. ERROR: While executing gem ... (ArgumentError) |
gem update --system does not solve this problem. |
Ran into this as well. Using 1.0.3 works for me. |
You should not get this error if you're using the latest version of Rubygems 1.8.10, however: if you have problems with gems that were installed with an older version of Rubygems, you will need to remove those gems, even if you update Rubygems. If you're using RVM with gemsets, this is relatively painless: rvm gemset empty
gem update --system
bundle The warnings should now go away. |
This is not an issue with Cucumber but with rubygems. Upgrading to rubygems 1.8.10 resolves the issue. Closing but adding some details for the Googlers out there. I'm running Ubuntu and so the upgrading the system rubygems requires a little more determination: sudo REALLY_GEM_UPDATE_SYSTEM=TRUE gem update --system After this
This was resolved by manually removing the referenced
This turned out to be because I was using a stale version of Bundler not compatible with the latest version of rubygems. Easily solved with just: gem update bundler Finally, I was able to |
I have both the latest bundle and the latest gem in my path. This does not solve the problem. $ bundle --version Using rvm to create a new gemset and install cucumber i see this error message: Invalid gemspec in [~/.rvm/gems/ruby-1.9.2-p290@junker/specifications/cucumber-1.0.4.gemspec]: Illformed requirement ["#Syck::DefaultKey:0x00000102b92140 0.8.4"] |
@coopsite please delete that dodgy gemspec file and reinstall cucumber with your new Rubygems. |
What about the people on Engine Yard stuck using Rubygems 1.5? This same issue was previously fixed in gherkin, why not fix it here as well? Please reopen. |
I think @aslakhellesoy is going to release a fix in the next few days. |
I just did a rubygems update:
They claim the Syck problem has been fixed. Yay! So I released 1.0.5, assuming it would be fixed. No dice. The gemspec still seems to be corrupted: https://rubygems.org/gems/cucumber/versions/1.0.5 As some of you know, I had similar issues with gherkin releases a couple of weeks back. I worked around it by removing all '= x.y.z' and 'x.y.z' dependencies in the gemspec, replacing them with '>= x.y.z'. Unfortunately we can't do that with prawn (for the pdf formatter). It doesn't work with newer versions of prawn. We could of course yank out the prawn formatter (or just remove the gem dependency and print an error if someone uses the prawn formatter without prawn installed). These are all workarounds. Rubygems is designed to work with '= x.y.z' dependencies, but right now it seems to buggy to work. Any tips on what I should do to release non-corrupt gems? |
There seems to be several gems that have this problem. Google for YAML::Syck::DefaultKey in the past week or month. I would submit a bug to the rubygems project, but I can't even find the bug tracker. |
Found it. There are 3 relevant bugs that claim to be fixed: http://rubyforge.org/search/?type_of_search=artifact&group_id=126&atid=575&words=DefaultKey&Search=Search The gems I release are still corrupt, and I am on ruby 1.9.2 and rubygems 1.8.10. I don't have much time to shave this yak right now, so some help would be great. |
On 13 Sep 2011, at 11:33, Aslak Hellesøy wrote:
Did you remove your old gemspecs first? I got caught out by this: gemspecs that were installed by the older, broken, Rubygems stay around, and cause errors even after you've upgraded Rubygems. |
@mattwynne I was talking about what rubygems lists as deps, not what I have/see locally. See the link. And here is a recent blog entry: http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html |
As explained in the article I downloaded the gemspec for 1.0.3 and 1.0.4 (1.0.5 is similar to 1.0.4):
1.0.3 and older were probably packaged using an older rubygems (using sych). Before releasing 1.0.4 (and 1.0.5) I had a newer ruby and rubygems (and psych). The = dependencies are unquoted, causing older rubygems to fail. rubygems.org is using an older rubygems to parse the gemspecs before displaying the deps on the web page, which explains why it looks like the gemspecs for 1.0.4 and 1.0.5 are corrupt. They are not. There are three ways to deal with this: a) I use a ruby with old rubygems (using sych) when releasing, so that both sych and psych can read the gemspec I realise many people can't do c). a) is too much of a PITA for me, so it will be b). This means I'll remove prawn from the gemspec (and >= the remaining = deps). I'll try to make a new release later. What a royal PITA! |
Thanks for the release. FYI, I think @dchelimsky ran into this with rspec as well. Every other project I've known to run into this ended up falling back to building their gems on 1.8. |
@cgriego - 1.0.5 does not fix the problems with 1.0.4. I'll have to make a 1.0.6 release later. |
1.0.6 is out. chew on that folks. |
Thanks so much for this, note I think the issue still persists with cucumber-rails. I am using @chicks work around for cucumber-rails for now. |
|
Sure, I'll get to that as well. |
Great, thanks for the fixes :) |
@aslakhellesoy: thanks for the |
rvm gemset empty this is NOT painless |
@mewren what's painful about it? |
@mewren I empty and repopulate gemsets regularly. Apart from this issue, which has been fixed for this set of gems, I've never had any problem with it. Do you have some specific problem? |
I am fairly new to rails/gems (well, I used it years ago, rails 1.2, but recently using it again), it ended up deleting all my gems and "bundle install" didn't have an error, but "gem list" was empty. Am I supposed to be using the "cucumber" or "cucumber-rails" gem? Which version of rails is the latest cucumber compatible with? error:
|
Remove Gemfile.lock from your rails project directory and try again. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Installing 1.0.4 (under Ruby 1.8.7 and gem 1.3.7) causes problems due to what I think is a corrupted gemspec, as can be see at http://rubygems.org/gems/cucumber/versions/1.0.4. By way of confirmation I'll quote http://stackoverflow.com/questions/7379385/invalid-gemspec-in-and-illformed-requirement-whenever-i-create-a-new-project.
The text was updated successfully, but these errors were encountered: