[jruby] How to integrate local GEMs, when running from a ScriptingContainer?

changepoint_advi.fischer at extaccount.com changepoint_advi.fischer at extaccount.com
Tue Jan 12 00:22:52 JST 2016


I install my gems into a project-local directory, 'gem':

    jruby -S gem install GEMNAME --install-dir ./gem

I include this gem directory in my jar file:

  jar cvfm app.jar ..... gem

I set the environment variables GEM_HOME and GEM_PATH to 'gem'.

Finally, the ScriptingContainer invokes my scriptlet using PathType=CLASSPATH

Everything seems to work fine - for example, my scriptlet can 'require' other Ruby files included - except that a 'require' does not find my Gems.

I had expected, that GEM_HOME will be interpreted relative to CLASSPATH, but this doesn't seem to be the case.


If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support.



More information about the JRuby mailing list