[Rubygems-developers] [ rubygems-Bugs-28582 ] gem build on a yaml spec file fails because of missing require 'yaml'

noreply at rubyforge.org noreply at rubyforge.org
Fri Nov 12 23:40:57 EST 2010


Bugs item #28582, was opened at 2010-09-20 13:37
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28582&group_id=126

Category: `gem` commands (other)
Group: v1.3.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Clint Byrum (spamaps)
>Assigned to: John Barnette (jbarnette)
Summary: gem build on a yaml spec file fails because of missing require 'yaml'

Initial Comment:
If I run gem build on a yaml gemspec, and I have no .gemrc, I get this error:


ubuntu at ip-10-196-111-253:~/g$ gem build metadata 
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Specification::YAML

However, if there is a .gemrc, I don't get an error.

This is because rubygems/config_file.rb requires yaml.

rubygems/specification.rb should require yaml at the top of the file as it uses YAML directly in its own code.


RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/1.8
     - /home/clint/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/


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

Comment By: Clint Byrum (spamaps)
Date: 2010-11-02 15:19

Message:
Here is a very tiny patch that solves this issue.

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28582&group_id=126


More information about the Rubygems-developers mailing list