On Tue, Mar 06, 2007 at 09:59:28AM +0900, Mark Volkmann wrote:
> >>When I run this I get
> >>
> >>/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./inline.rb:378:in
> >>`build': undefined method `+' for nil:NilClass (NoMethodError)
> >>        from /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./
> >>inline.rb:628:in `inline'
> >>        from demo.rb:5
> >>
> >>I'm not sure if I'm doing something wrong or there is a bug in that
> >>version of RubyInline.
> >
> >Running exactly what operating system and version, and what version  
> >of ruby?
> >
> >Wild guess: perhaps you are running something like Ubuntu without the
> >ruby1.8-dev package installed. But without basic information about the
> >environment, it's hard to give any concrete suggestions.
> 
> I ran this under Mac OS X.
> 
> Output from ruby -v -rrbconfig -e 'p Config::CONFIG["archdir"],  
> Config::CONFIG["srcdir"]' is
> ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.1]
> "/usr/local/lib/ruby/1.8/i686-darwin8.8.1"
> nil

On my machine, the context is

          srcdir  = Config::CONFIG["srcdir"]
          archdir = Config::CONFIG["archdir"]
          if File.exist? archdir + "/ruby.h" then
            hdrdir = archdir
          elsif File.exist? srcdir + "/ruby.h" then
            hdrdir = srcdir
          else
            $stderr.puts "ERROR: Can't find header files for ruby. Exiting..."
            exit 1
          end

So you could try adding

          $stderr.puts "srcdir = #{srcdir.inspect}"
          $stderr.puts "archdir = #{archdir.inspect}"

before the File.exist? line, to see if that helps narrow things down.