I would like to use different Rubys (ruby 1.9.3 and jruby 1.7.0) in one project.
I need to do this, because I am getting errors in my project, when I use Jruby for the whole project. Therefore, I want to use Jruby only for the classes that actually need it and normal Ruby for others.
Is this possible? How?
Ruby and JRuby can’t run in the same process, so to use them together in the same project you need to have separate processes, and some kind of inter-process communication. This could be as simple as having the JRuby program execute a Ruby script using backticks, receiving stdout from the process as a string, or as much more complicated than that as it has to be. To get fancier, you could use a FIFO or a message queue, for instance.