Adding gems to ScriptingContainer

I’m still struggling with the task to embed a jruby setup into an
existing Java application. I tried rawr which doesn’t seem to do what I
wan’t. I played a bit more with the Scripting container and it works as
long as i reference the gems in my JRuby home. But I need to integrate
the gems into the jar I’m going to deploy.

Is this possible ?

Regards
Roger


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,

On Wed, Sep 29, 2010 at 3:28 AM, Roger G. [email protected] wrote:

I’m still struggling with the task to embed a jruby setup into an existing
Java application. I tried rawr which doesn’t seem to do what I wan’t. I
played a bit more with the Scripting container and it works as long as i
reference the gems in my JRuby home. But I need to integrate the gems into
the jar I’m going to deploy.

Is this possible ?

My suggestion might be alternative to what in your mind.
If you don’t mind to use bundler, you can put all classes and gems in
a single jar easily. Here’s a gist gist:603328 · GitHub

I installed DataMapper gems in my Java project on Eclipse, so the path
to Gemfile includes user.dir system property. When you want to build
all in a jar archive, a path to Gemfile should be something like
“jar:…”

Hope this helps.
-Yoko


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,

My suggestion might be alternative to what in your mind.
If you don’t mind to use bundler, you can put all classes and gems in
a single jar easily. Here’s a gist gist:603328 · GitHub


Since bundle doesn’t support any kind of jar packaging it seems that I
have to package the gem directory created by bundler into a jar
archive. Right?

This approach looks really promising. My problem was that I I thought
the requiring a jar will only work for jars containing class files.

Regards
Roger


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Wed, Sep 29, 2010 at 5:25 PM, Roger G. [email protected] wrote:

Hi,

My suggestion might be alternative to what in your mind.
If you don’t mind to use bundler, you can put all classes and gems in
a single jar easily. Here’s a gist gist:603328 · GitHub


Since bundle doesn’t support any kind of jar packaging it seems that I have to
package the gem directory created by bundler into a jar archive. Right?

I tried jar packaging,

Perhaps, this is one of the packaging measures of Java code and gems.

-Yoko