Native extensions and how to handle them

I am attempting to install Refinery CMS and ran into issues installing
the unicode and slim_scrooge gems. Both apparently use native
extensions and both refer me to the wiki for further information. I can
see anything of any great use in the wiki. At least, a quick search
turned up nothing.

As a Java programmer with little knowledge of using native extensions
and even less knowledge of C, how do I go about manually compiling and
installing these gems?

Using JRuby 1.4.0

Pete


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Tue, Dec 15, 2009 at 4:33 PM, Pete H. [email protected] wrote:

I am attempting to install Refinery CMS and ran into issues installing the
unicode and slim_scrooge gems. Â Both apparently use native extensions and
both refer me to the wiki for further information. Â I can see anything of
any great use in the wiki. Â At least, a quick search turned up nothing.

As a Java programmer with little knowledge of using native extensions and
even less knowledge of C, how do I go about manually compiling and
installing these gems?

As Stephen pointed out, JRuby does not support Ruby’s C extensions. I
would recommend bringing it up with the Refinery CMS folks and working
with them to find an alternative, so they don’t depend on code that
only runs on the standard C implementation of Ruby. If they know folks
like you want to use their project, perhaps they’ll pay more attention
to avoiding hard C extension requirements.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Thanks. Charles also suggested I get in touch with the Refinery folks
and see if they might consider approaches that eliminate the C
extensions, which may be the best overall approach. I’ll see what I can
do.

Pete

I am attempting to install Refinery CMS and ran into issues installing the unicode and slim_scroogegems. Both apparently use native extensions and both refer me to the wiki for further information. I can see anything of any great usein the wiki. At least, a quick search turned up nothing.

As a Java programmer with little knowledge of using native extensions and even less knowledge of C, how do I go about manually compiling and installing these gems?

Using JRuby 1.4.0

Gems with native C extensions don’t work with JRuby.

If the native extensions in the two gems are just wrappers around native
C libraries built into the OS AND it is worth the effort – you (or
someone else) could possibly re-write the two gems to use ruby-ffi to
access the native C libraries – the gems would then work in C Ruby and
JRuby (as well as any other Ruby VM that supported ffi).

see: http://wiki.github.com/ffi/ffi


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email