[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 01:43:57 JST 2016


UPDATE:

I just found this link:

   http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar/

Though there is one small error on this page, I could manage to do it. The trick seems to be to bundle the Gems in a separate jar.

Mit freundlichen Grüßen / Best Regards
Team Flashprozesstools
Ronald Fischer

Meitnerstr. 8
5. Stock / 85
70563 Stuttgart

Im Auftrag der/on behalf of
Daimler AG

mailto: changepoint_advi.fischer at extaccount.com

Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns
umgehend über den irrtümlichen Empfang zu informieren und
diese E-Mail zu löschen. Wir danken Ihnen für Ihre Unterstützung.


> -----Original Message-----
> From: JRuby [mailto:jruby-bounces at ruby-lang.org] On Behalf Of
> changepoint_advi.fischer at extaccount.com
> Sent: Monday, January 11, 2016 4:23 PM
> To: jruby at ruby-lang.org
> Subject: [jruby] How to integrate local GEMs, when running from a
> ScriptingContainer?
>
> 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.


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