Bugs item #28907, was opened at 2011-02-03 18:59
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28907&group_id=126

Category: `gem` commands (other)
Group: v1.5.x
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Jon Forums (jonforums)
Assigned to: Eric Hodel (drbrain)
Summary: [RG 1.5.0/Ruby 1.9.x] source gem build error due to syck?

Initial Comment:
When building a source gem from http://github.com/oopsforge/oops-null using 
'rake gem' I get the following error on Win7 with:

  * ruby 1.9.2p174 (2011-01-28 revision 30696) [i386-mingw32]
  * ruby 1.9.3dev (2011-02-04 trunk 30776) [i386-mingw32]

but no errors using "ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]".  

Manually building via 'gem build oops-null.gemspec' work fine on all the Ruby 
versions including JRuby 1.6.0.RC1.  All versions have been upgraded to RG 
1.5.0 via "gem update --system".

FWIW, the failure does not occur on "ruby 1.9.2 (2010-12-25 patchlevel 136) 
[i386-mingw32]" using RG 1.3.7

My "fix" was to add the following lines to the project Rakefile after the 3 
require's:

require 'yaml'
YAML::ENGINE.yamler='psych' if defined?(YAML::ENGINE)

I will try to replicate on my Arch system later this afternoon.

Reproducible?

Jon


== ERROR ==

C:\projects\oops-null-git>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.0
  - RUBY VERSION: 1.9.2 (2011-01-28 patchlevel 174) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/ruby192/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: C:/ruby192/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/ruby192/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/ruby192/lib/ruby/gems/1.9.1
     - C:/Users/Jon/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://rubygems.org";, "http://gemcutter.org";]
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org
     - http://gemcutter.org


C:\projects\oops-null-git>rake gem
(in C:/projects/oops-null-git)
mkdir -p pkg
mkdir -p pkg
mkdir -p pkg/oops-null-0.3.0/bin
rm -f pkg/oops-null-0.3.0/bin/nulloops
ln bin/nulloops pkg/oops-null-0.3.0/bin/nulloops
rm -f pkg/oops-null-0.3.0/Rakefile
ln Rakefile pkg/oops-null-0.3.0/Rakefile
rm -f pkg/oops-null-0.3.0/oops-null.gemspec
ln oops-null.gemspec pkg/oops-null-0.3.0/oops-null.gemspec
mkdir -p pkg/oops-null-0.3.0/ext/oops_null
rm -f pkg/oops-null-0.3.0/ext/oops_null/extconf.rb
ln ext/oops_null/extconf.rb pkg/oops-null-0.3.0/ext/oops_null/extconf.rb
rm -f pkg/oops-null-0.3.0/ext/oops_null/oops_null.c
ln ext/oops_null/oops_null.c pkg/oops-null-0.3.0/ext/oops_null/oops_null.c
rm -f pkg/oops-null-0.3.0/ext/oops_null/oops_null.h
ln ext/oops_null/oops_null.h pkg/oops-null-0.3.0/ext/oops_null/oops_null.h
mkdir -p pkg/oops-null-0.3.0/lib
rm -f pkg/oops-null-0.3.0/lib/oops-null.rb
ln lib/oops-null.rb pkg/oops-null-0.3.0/lib/oops-null.rb
cd pkg/oops-null-0.3.0
rake aborted!
undefined method `write' for #<Syck::Emitter:0x22bd9e0>
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in `end_document'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in 
`visit_Psych_Nodes_Document'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/visitor.rb:10:in `accept'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in `block in 
visit_Psych_Nodes_Stream'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in `each'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in 
`visit_Psych_Nodes_Stream'
C:/ruby192/lib/ruby/1.9.1/psych/visitors/visitor.rb:11:in `accept'
C:/ruby192/lib/ruby/1.9.1/psych/nodes/node.rb:36:in `to_yaml'
C:/ruby192/lib/ruby/1.9.1/psych.rb:166:in `dump'
C:/ruby192/lib/ruby/1.9.1/psych/core_ext.rb:13:in `psych_to_yaml'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in 
`node_export'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in `add'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in 
`encode_with'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:727:in `block (2 
levels) in to_yaml'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:726:in `map'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:726:in `block in 
to_yaml'
C:/ruby192/lib/ruby/1.9.1/syck.rb:401:in `call'
C:/ruby192/lib/ruby/1.9.1/syck.rb:401:in `emit'
C:/ruby192/lib/ruby/1.9.1/syck.rb:401:in `quick_emit'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:725:in `to_yaml'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:78:in `block (2 levels) 
in write_package'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:73:in `block 
(3 levels) in add_gem_contents'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:83:in `new'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:67:in `block 
(2 levels) in add_gem_contents'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in `wrap'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in `block 
in add_gem_contents'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:113:in 
`add_file'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:63:in 
`add_gem_contents'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:31:in `open'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:68:in `open'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:77:in `block in 
write_package'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:in `open'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:in `write_package'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:39:in `build'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:116:in `block (3 
levels) in define'
C:/ruby192/lib/ruby/1.9.1/rake.rb:1157:in `when_writing'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:115:in `block (2 
levels) in define'
C:/ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `chdir'
C:/ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `cd'
C:/ruby192/lib/ruby/1.9.1/rake.rb:1092:in `chdir'
C:/ruby192/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:114:in `block in 
define'
C:/ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/ruby192/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
C:/ruby192/lib/ruby/1.9.1/rake.rb:602:in `each'
C:/ruby192/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
C:/ruby192/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
C:/ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/ruby192/bin/rake:31:in `<main>'

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

Comment By: Roger Pack (rogerdpack)
Date: 2011-12-13 16:45

Message:
just got this today:

undefined method `write' for #<Syck::Emitter:0x29ba928>

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

full output: https://gist.github.com/1472862

will reopen if I run into this again...

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

Comment By: Roger Pack (rogerdpack)
Date: 2011-03-03 20:01

Message:
Was this still fixed in 1.6.0? (I'm still getting it there).
Thanks!
-r

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

Comment By: Eric Hodel (drbrain)
Date: 2011-02-28 18:56

Message:
Fixed by 1.5.3

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

Comment By: Ryan Davis (zenspider)
Date: 2011-02-25 19:38

Message:
So, to be clear, if psych is used to create a gemspec with a version specifier 
using "=", and the gem is subsequently loaded using syck, this error will occur.

This is a bug in syck.

Our workaround is to look up the parsed value and if it looks up nil, fall back 
on a manual "=". We should backport this fix into the 1.5 line.

Eric. I'll leave the backport to you.

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

Comment By: Roger Pack (rogerdpack)
Date: 2011-02-25 18:24

Message:
Just got this with jeweler, too, FYI.

https://gist.github.com/844237

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

Comment By: Leonard Chin (lchin)
Date: 2011-02-10 07:37

Message:
The same error occurs with hoe

Using RubyGems at commit 182bcaf7bd4f77493794 with Ruby 1.9.2-p136
https://github.com/rubygems/rubygems/tree/182bcaf7bd4f77493794d216ac37aa9935655943

rake package --trace
(in /Users/lchin/Downloads/buggy)
** Invoke package (first_time)
** Invoke pkg/buggy-1.0.0.tgz (first_time, not_needed)
** Invoke pkg/buggy-1.0.0 (first_time, not_needed)
** Invoke .autotest (first_time, not_needed)
** Invoke History.txt (first_time, not_needed)
** Invoke Manifest.txt (first_time, not_needed)
** Invoke README.txt (first_time, not_needed)
** Invoke Rakefile (first_time, not_needed)
** Invoke bin/buggy (first_time, not_needed)
** Invoke lib/buggy.rb (first_time, not_needed)
** Invoke test/test_buggy.rb (first_time, not_needed)
** Invoke .autotest (not_needed)
** Invoke History.txt (not_needed)
** Invoke Manifest.txt (not_needed)
** Invoke README.txt (not_needed)
** Invoke Rakefile (not_needed)
** Invoke bin/buggy (not_needed)
** Invoke lib/buggy.rb (not_needed)
** Invoke test/test_buggy.rb (not_needed)
** Invoke gem (first_time)
** Invoke pkg/buggy-1.0.0.gem (first_time)
** Invoke pkg (first_time, not_needed)
** Invoke pkg/buggy-1.0.0 (not_needed)
** Invoke .autotest (not_needed)
** Invoke History.txt (not_needed)
** Invoke Manifest.txt (not_needed)
** Invoke README.txt (not_needed)
** Invoke Rakefile (not_needed)
** Invoke bin/buggy (not_needed)
** Invoke lib/buggy.rb (not_needed)
** Invoke test/test_buggy.rb (not_needed)
** Execute pkg/buggy-1.0.0.gem
cd pkg/buggy-1.0.0
WARNING:  description and summary are identical
rake aborted!
undefined method `write' for #<Syck::Emitter:0x00000100919d48>
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in
 `end_document'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in
 `visit_Psych_Nodes_Document'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/visitor.rb:10:in
 `accept'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in
 `block in visit_Psych_Nodes_Stream'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in
 `each'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in
 `visit_Psych_Nodes_Stream'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/visitors/visitor.rb:11:in
 `accept'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/nodes/node.rb:36:in
 `to_yaml'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:166:in `dump'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych/core_ext.rb:13:in 
`psych_to_yaml'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in
 `node_export'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in
 `add'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:706:in
 `encode_with'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:728:in
 `block (2 levels) in to_yaml'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:727:in
 `map'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:727:in
 `block in to_yaml'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/syck.rb:401:in `call'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/syck.rb:401:in `emit'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/syck.rb:401:in 
`quick_emit'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:726:in
 `to_yaml'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:78:in
 `block (2 levels) in write_package'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:73:in
 `block (3 levels) in add_gem_contents'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:83:in
 `new'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:67:in
 `block (2 levels) in add_gem_contents'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in
 `wrap'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in
 `block in add_gem_contents'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:113:in
 `add_file'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:63:in
 `add_gem_contents'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:31:in
 `open'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:68:in
 `open'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:77:in
 `block in write_package'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:in
 `open'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:in
 `write_package'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:39:in
 `build'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:116:in
 `block (3 levels) in define'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:1159:in
 `when_writing'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:115:in
 `block (2 levels) in define'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/fileutils.rb:121:in 
`chdir'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/fileutils.rb:121:in `cd'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:1094:in
 `chdir'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package_task.rb:114:in
 `block in define'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:636:in
 `call'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:636:in
 `block in execute'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:631:in
 `each'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:631:in
 `execute'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:597:in
 `block in invoke_with_call_chain'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in 
`mon_synchronize'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:590:in
 `invoke_with_call_chain'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:607:in
 `block in invoke_prerequisites'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:604:in
 `each'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:604:in
 `invoke_prerequisites'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:596:in
 `block in invoke_with_call_chain'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in 
`mon_synchronize'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:590:in
 `invoke_with_call_chain'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:607:in
 `block in invoke_prerequisites'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:604:in
 `each'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:604:in
 `invoke_prerequisites'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:596:in
 `block in invoke_with_call_chain'
/Users/lchin/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in 
`mon_synchronize'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:590:in
 `invoke_with_call_chain'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:583:in
 `invoke'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2051:in
 `invoke_task'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2029:in
 `block (2 levels) in top_level'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2029:in
 `each'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2029:in
 `block in top_level'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2068:in
 `standard_exception_handling'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2023:in
 `top_level'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2001:in
 `block in run'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:2068:in
 `standard_exception_handling'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:1998:in
 `run'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/bin/rake:31:in 
`<top (required)>'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/bin/rake:19:in `load'
/Users/lchin/.rvm/gems/ruby-1.9.2-p136@global/bin/rake:19:in `<main>'

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

Comment By: Jon Forums (jonforums)
Date: 2011-02-05 22:00

Message:
All OK now with the updated rake-compiler.

So I'm clear, this is the main commit to pay attention to?

https://github.com/rubygems/rubygems/commit/67f9f760c782142d9bfd8099750274ba498d6682

Given the simple tweak to rake-compiler, is your
recommendation that other gems requiring yaml also prefer
psych when running on 1.9.2+ and RG 1.5.0+

FWIW, I personally like the idea of preferring psych, but
would like to have first seen it mentioned in one of the
following rather than in a bt:

http://blog.segment7.net/2011/01/31/rubygems-1-5

https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc 

Jon

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

Comment By: Eric Hodel (drbrain)
Date: 2011-02-04 23:37

Message:
Yes, you are loading syck (require 'yaml') before psych (require 'psych'):

https://github.com/luislavena/rake-compiler/blob/master/lib/rake/baseextensiontask.rb

This is not supported.

A patch will be sent to rake-compiler.

You can work around this by requiring psych before rake-compiler.

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

Comment By: Jon Forums (jonforums)
Date: 2011-02-04 21:01

Message:
That's not the issue, sorry I wasn't clear.  I'm not mixing 
syck or psyck in the same ruby in my code.

My original Rakefile https://github.com/oopsforge/oops-
null/blob/master/Rakefile that worked pre-1.5.0 didn't 
explicitly require 'yaml' or the YAML::ENGINE.yamler= 
nonsense.

I added these lines to get the gem to build when I saw the 
error message

undefined method `write' for #<Syck::Emitter:0x22bd9e0>
C:/ruby192/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in 
`end_document'
...

..as I guessed that explicitly setting the YAML engine to 
psych would prevent syck from being visited/wrapped by 
psych.

I think something's changed in RG 1.5.0 and/or ruby_1_9_2 or 
trunk that's causing the problem. I wanted to dig into how 
psych was visiting/wrapping syck but ran out of time. I also 
did a quick look through rake-compiler and don't think it's 
to blame.

Given that my original Rakefile fails on Win7 MRI 1.9.2-
p174, 1.9.2-p136, 1.9.3dev and Arch 1.9.3dev when using RG 
1.5.0 I still think the problem is in RG.

Hopefully I explained it more clearly this time.

Would you take one more look at that long back trace and see 
if you change your mind on the issue?

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

Comment By: Eric Hodel (drbrain)
Date: 2011-02-04 20:33

Message:
Do not mix syck (require 'yaml') and psych (require 'psych') in the same ruby.

RubyGems uses psych on ruby 1.9.2 and newer as syck is deprecated and will be 
removed at a future date.  Please update your Rakefile to match.

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

Comment By: Jon Forums (jonforums)
Date: 2011-02-04 14:53

Message:
same failure on "ruby 1.9.2p136 (2010-12-25) [i386-mingw32]" 
upgraded from RG 1.3.7 to RG 1.5.0

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

Comment By: Jon Forums (jonforums)
Date: 2011-02-03 19:13

Message:
similar failure and working "fix" on Arch using:

ruby 1.9.3dev (2011-02-04 trunk 30776) [i686-linux]

RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.0
  - RUBY VERSION: 1.9.3 (2011-02-04 patchlevel -1) [i686-
linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.9.1
     - /home/jon/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://rubygems.org";, 
"http://gemcutter.org";]
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - http://rubygems.org
     - http://gemcutter.org

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28907&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