From: Eric Hodel Date: 2009-05-21T04:11:27+09:00 Subject: Re: undefined method `empty?' for nil:NilClass in gem build On May 20, 2009, at 10:08, Ken Bloom wrote: > I'm trying to build a rubygem, but I keep getting the following error. > Can anybody help? > > $ gem build wordnet.gemspec > ERROR: While executing gem ... (NoMethodError) > undefined method `empty?' for nil:NilClass > > $ cat wordnet.gemspec > Gem::Specification.new do |s| > s.name="WordNet" > s.author="Ken Bloom" > s.email="kbloom@gmail.com" > s.version="1.0.1" > s.summary="A binding to the WordNet C library" > s.require_path="ext" > > #disabled because it spews lots of errors > #but the generated rdoc isn't useful in the least > s.has_rdoc=false Note that RDoc 1.3.3 ignores this setting and always generates RDoc. DON'T be lazy, document your code! (You may want to install RDoc 2 if you're getting warnings) > s.files += Dir["ext/*"] > s.extensions << "ext/extconf.rb" > end > > $ gem environment > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.2 Maybe there's a bug in 1.3.2, try upgrading: $ touch ext/extconf.rb NOTE: DON'T be lazy, do it right! You forgot to specify all these things. Filling them in is in the best interests of everyone. $ gem build wordnet.gemspec WARNING: no description specified WARNING: no homepage specified WARNING: no rubyforge_project specified Successfully built RubyGem Name: WordNet Version: 1.0.1 File: WordNet-1.0.1.gem $ gem env version 1.3.3