Bugs item #29163, was opened at 2011-05-04 23:14
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29163&group_id=126

Category: `gem` commands (other)
Group: next
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Bruno Michel (nono)
Assigned to: Evan Phoenix (evan)
Summary: Invalid specs resulting from incorrect syck time parsing

Initial Comment:
Hi,

I have the bug described on https://github.com/rubygems/rubygems/pull/57 with 
Ruby 1.9.2-p180 and Rubygems v1.8.0. If I generate a gem with `gem build`, the 
`date` field in the metadata of the generated gem is:

date: 2011-05-04 00:00:00.000000000Z

If I push this gem on rubygems.org and try to install it remotely (same PC), 
this does not works:

ERROR:  While executing gem ... (NameError)
    uninitialized constant Psych::Syck



----------------------------------------------------------------------

>Comment By: Evan Phoenix (evan)
Date: 2011-06-01 20:45

Message:
Yep. You can see the syck bug by running this code:

YAML.load "- - =\n  - 1\n"

You'll see that syck puts DefaultKey in there, which is just plain wrong.
 

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-06-01 20:42

Message:
The problem is that psych will generate a perfectly valid string that starts 
with an unquoted '='. Syck has a bug parsing that and winds up using DefaultKey.

----------------------------------------------------------------------

Comment By: Bruno Michel (nono)
Date: 2011-06-01 19:13

Message:
Thanks for the explanation.

The gem was regenerated with a Ruby 1.8 and a new version
was pushed. If I want to build the next version with Ruby
1.9, how can I can be sure the new gem don't have a
YAML::Syck::DefaultKey?

----------------------------------------------------------------------

Comment By: Evan Phoenix (evan)
Date: 2011-06-01 18:09

Message:
I've fixed this by having the DefaultKey class always available and having 
Requirement fix up any reference to it.

Fixed in github:0f4067a

----------------------------------------------------------------------

Comment By: Evan Phoenix (evan)
Date: 2011-06-01 16:16

Message:
This is because html_spellchecker has an instance of YAML::Syck::DefaultKey in 
its gemspec.

These should not be in gemspecs and the gem needs to be regenerated. I'm 
looking into a way to mitigate this in the mean time.

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-05-24 10:20

Message:
I think it is your cache... That URL looks OK via:

    curl http://gems:nas...@gems.af83.com/specs.4.8.gz | gunzip -dc | ruby 
-Ilib -rubygems -e 'p Marshal.load $stdin.read'

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-05-24 10:12

Message:
Bruno, this installs fine for me as you can see below... From your output, I 
suspect you might have a bad source in your list. Specifically "gems.af83.com" 
looks like it might be bad for you. Can you do `gem sources -c` to ensure that 
your sources are default and your caches are cleared and try again to verify?

    % gem i -i xxx html_spellchecker --version=0.1.1 -V --backtrace
    GET http://rubygems.org/specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/specs.4.8.gz
    200 OK
    GET http://rubygems.org/quick/Marshal.4.8/html_spellchecker-0.1.1.gemspec.rz
    ... and so on to completion ...

----------------------------------------------------------------------

Comment By: Bruno Michel (nono)
Date: 2011-05-24 09:43

Message:
Hi,

for example:

~% gem install html_spellchecker --version=0.1.1 -V --backtrace
GET http://rubygems.org/specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/specs.4.8.gz
304 Not Modified
GET http://gems:nas...@gems.af83.com/specs.4.8.gz
200 OK
ERROR:  While executing gem ... (NameError)
    uninitialized constant Psych::Syck
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:640:in
 `load'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:640:in
 `_load'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:134:in
 `load'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:134:in
 `fetch_spec'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:95:in
 `block in fetch_with_errors'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:94:in
 `map'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:94:in
 `fetch_with_errors'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:110:in
 `find_gems_with_sources'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:228:in
 `find_spec_by_name_and_version'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:259:in
 `install'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:121:in
 `block in execute'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:in
 `each'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:in
 `execute'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in
 `invoke'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in
 `process_args'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in
 `run'
        
/home/nono/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in
 `run'
        /home/nono/.rvm/rubies/ruby-1.9.2-p180/bin/gem:21:in `<main>'
zsh: exit 1
~% gem -v
1.8.3


----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-05-24 00:38

Message:
I need a full backtrace and the gem name+version to properly investigate.

Your error doesn't jive with the date problem. (If I'm remembering the error 
correctly).

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29163&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to