On Thu, May 22, 2008 at 12:25 AM, Clifford Heath <[EMAIL PROTECTED]> wrote: > Thanks Luis. I got the gem to build automatically, but the > shared library load path doesn't seem to be set correctly. > The require_paths in the gemspec is ["lib", "ext/wbxml"], > but the .bundle built on MacOSX doesn't load when the > .rb in the lib directory says "require 'wbxml.so'". > > Any idea what the story is here? >
What are you trying to do? you mention a bundle file, but then a require 'wbxml.so'? first of you need to remove extensions from your requires, that breaks compatibility since OSX uses 'bundle' and Linux/Windows uses 'so' as extensions for the shared objects. > If anyone wants to check it out, it's the wbxml project on > RubyForge. You'll need libwbxml-dev (or port install wbxml2) > to build it. > I've checked your Rakefile: http://wbxml.rubyforge.org/svn/Rakefile And you're assuming a lot about the extension (and the extension of it too). I suggest you take a look at DrNic post about newgem generators related to building C extensions: http://drnicwilliams.com/2008/04/01/writing-c-extensions-in-rubygems/ > The answer to getting the gem to build extensions on install > was to modify the config/hoe.rb generated by "newgem", adding > > # Arrange to build the extension on install: > $hoe.spec.extensions = ['ext/wbxml/extconf.rb'] > As I commented before, Hoe was not aimed to create gems that bundles extensions out of the box. Are you trying to build a native (pre-build) platform specific gem? or are you trying to include in your gem the C extension? -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams _______________________________________________ Rubygems-developers mailing list [email protected] http://rubyforge.org/mailman/listinfo/rubygems-developers
