rough code as i am experimenting: ``` private ScriptEngine configureScriptEngine() { System.setProperty("org.jruby.embed.localcontext.scope", "threadsafe"); System.setProperty("org.jruby.embed.localvariable.behavior", "transient"); ScriptEngine engine = factory.getScriptEngine(); try { String environment = "ENV['RUBYLIB']='/Users/boc@us.ibm.com/personal/src/openhab-scripting/tmp/openhab/conf/automation/lib/ruby/lib'\n" + "ENV['GEM_HOME']='/Users/boc@us.ibm.com/personal/src/openhab-scripting/tmp/openhab/conf/automation/lib/ruby/gem_home'"; logger.error("Environment being set: {}", environment); engine.eval(environment); } catch (ScriptException e) { logger.error("Error setting environment", e); } return engine; } ```