Bugs item #28907, was opened at 2011-02-03 10: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: Rejected
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: Eric Hodel (drbrain)
Date: 2011-02-04 12: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 06: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 11: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