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

  • Java 1.5 or higher
  • Ant 1.7 or higher
  • Appropriate build tools (make, gcc)
    • On Windows, you'll want the mingw32 tools available in PATH

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.

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close