3 ms·
I work on a jRuby/Rails project. The most difficult issue with going to jRuby from MRI is c gems. For example if you are using the ruby racer to compile assets
by bobfirestone 13y ago
I work on a jRuby/Rails project. The most difficult issue with going to jRuby from MRI is c gems. For example if you are using the ruby racer to compile assets you have to swap it out for the java based ruby rhino. If there isn't a java version or equivalent then you are pretty much going to have to write it yourself.
Writing standard ruby gems make sure you are thread safe and it will run in both.
For background jobs look at sidekiq. It plays well with the jvm.
Unless you are in love with the JVM I would recommend taking a look at rubinius. It is a ruby implementation written in ruby and C++. I hadn't looked at it in a couple of years but the current version has gotten my attention. Just tinkering locally the performance is excellent and no JVM related issues.