I am using JRuby along with Cucumber and is looking for a way of running
jruby -S gem update --system
jruby -S gem install cucumber
from within the Java ScriptEngine. No amount of Googling have let me to a solution to this problem. Basically I want to be able to do something like this
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine jRubyEngine = manager.getEngineByName("jruby");
: // some unknown code here
jRubeEngine.eval("call gems install/update from inside JRuby")
Is there a way of accomplishing this?