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.
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:…”
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.