C Extension Alternatives
Clone this wiki locally
JRuby versions prior to 1.6 did not support Ruby C extensions, and even in 1.6 the support is still "in development" and considered experimental. As of 1.7, it has been disabled and will likely be removed.
This page lists common C extensions and non-C alternatives you can use to replace them.
RMagick - Try RMagick4J (implements ImageMagick functionality in Java) or preferably use alternatives mini_magick & quick_magick. For simple resizing, cropping, greyscaling, etc look at image_voodoo. You can also use Java's Graphics2D.
mysql - Use activerecord-jdbcmysql-adapter instead.
mysql2 - Use activerecord-jdbcmysql-adapter instead.
sqlite3 - Use activerecord-jdbcsqlite3-adapter instead.
Nokogiri - For best results, use the pure-Java version of Nokogiri (default after v1.5).
yajl-ruby - Try
json_pureinstead. Unfortunately there is no known equivalent JSON stream parser.
oj - Try
bson_extisn't used with JRuby. Instead, some native Java extensions are bundled with the
win32ole - Use the
jruby-win32olegem (preinstalled in JRuby's Windows installer).
Please add to this list with your findings.
Note that the JRuby-Lint gem parses the contents of the list above to use for its Ruby gem checker. In order for JRuby-Lint to use the information, please adhere to the
gem_name - instructions format.