[Nitro] Cannot require 'builder' in a Nitro app

James Britt james_b at neurogami.com
Fri Jan 20 15:55:38 EST 2006


I'm trying to use Jim Wierich's XML Builder library in Nitro to create 
atom and rss feeds.  I cannot call "require 'builder'" without errors.

This is with Nitro 0.27 on winxp with Ruby 1.8.2

rubygems automagically included by way of RUBYOPTS


If I run this bare script:

   require 'builder'

It runs fine.

But as soon as I add nitro to the mix, I get assorted errors

This:

   require 'builder'
   require 'nitro'


Gives this:

C:\WINDOWS\system32\cmd.exe /c c:/ruby/bin/ruby build.rb
c:/ruby/lib/ruby/gems/1.8/gems/facets-2005.10.30/lib/mega/basicobject.rb:90:in 
`bind': singleton method called for a different object (TypeError)
         from 
c:/ruby/lib/ruby/gems/1.8/gems/facets-2005.10.30/lib/mega/basicobject.rb:90:in 
`method_added'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/facets-2005.10.30/lib/mega/basicobject.rb:89:in 
`method_added'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/facets-2005.10.30/lib/mega/openobject.rb:56
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/facets-2005.10.30/lib/mega/annotation.rb:53
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
          ... 6 levels...
         from c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.27.0/lib/nitro.rb:11
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:25:in `require__'
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:25:in `require'
         from build.rb:2
shell returned 1



And this:

   require 'nitro'
   require 'builder

Gives this:

C:\WINDOWS\system32\cmd.exe /c c:/ruby/bin/ruby build.rb
c:/ruby/lib/ruby/gems/1.8/gems/builder-1.2.4/lib/builder/blankslate.rb:11: 
Builder is not a module (TypeError)
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
         from 
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/builder-1.2.4/lib/builder/xmlbase.rb:3


Are there special libraries that cannot be used wth Nitro?

Is there a trick to including certain libraries?



Thanks,


James



More information about the Nitro-general mailing list