Re: [jruby-user] How to use GEM from Java application

christian <[email protected]>
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CAMV7UWF2BEKtAoWWa7Cbg3dfciqbTaptH1AhzchTwSS-bR7JTQ@mail.gmail.com>
mkdir rubygems
GEM_PATH=rubygems GEM_HOME-rubygems jruby -S gem install mygem
cd rubygems
jar -cf ../gems.jar .
add this gems.jar along the jruby.jar on the same classpath/classloader
then jruby will pick your gems.

see also
https://github.com/jruby/jruby/wiki/Jruby-Scripting-container-using-Gems-with-a-Maven-Project

for running inside OSGi or some j2ee containers there is a little more to
do (the wiki would need some update here).

let me know if I was not clear enough . . . christian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.