[Rubygems-developers] Binary gems or extension source - which and how?
clifford.heath at gmail.com
Wed May 21 23:25:25 EDT 2008
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?
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.
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']
On 22/05/2008, at 11:09 AM, Luis Lavena wrote:
> On Wed, May 21, 2008 at 9:55 PM, Clifford Heath
> <clifford.heath at gmail.com> wrote:
>> I've used newgem to build a gem that's a simple wrapper for the wbxml
>> and I'm not sure how to publish it. My Manifest includes the ext
>> extconf.rb, but since newgem & hoe build the gemspec file on the
>> fly, I
>> been able to work out how to arrange for the extension to be built on
>> Can someone give me some pointers please? The reference is too
>> I'm looking for a recipe if possible.
> You need to tweak somehow the spec Hoe generates inside the Hoe.new
> do...end block.
> AFAIK, right now Hoe is not able to handle normal C extensions, only
> inlined ones (the ones generated via RubyInline).
> I think Aslak Hellesoy published something related to this subject:
>> Also, what support does gems provide for the naming procedure for
>> files? If I want to publish platform-specific binary gems in
>> addition to the
>> version, what's the procedure?
> rubygems itself append the platform specific to the end part of the
> filename it generates:
> Luis Lavena
> AREA 17
> Human beings, who are almost unique in having the ability to learn
> the experience of others, are also remarkable for their apparent
> disinclination to do so.
> Douglas Adams
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
More information about the Rubygems-developers