Last updated January 11, 2011 19:25, by headius
Feedicon  

In JRuby 1.6, we added support for Ruby's C API, allowing C-based extensions to build and run on JRuby.

Released

JRuby 1.6.0 RC1 released prebuilt support for C extensions on OS X. The final release will include prebuilt support for Linux and Windows as well.

Building

If you need C extension support on a platform for which we do not have prebuilt binaries, you'll want to grab and build JRuby yourself.

Prerequisites

Steps for building

  1. Grab and unpack the src dist from JRuby.org downloads (Note: RC1's src tarball did did not have the "cext" dir included. Download a tarball from github)
  2. Run 'ant cext' from the unpacked directory

Ant should build JRuby as normal and then call "make" to build the C extension support.

Troubleshooting

Please post issues to the JRuby mailing lists, including whether extensions you use are working or not working.