This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ruby and the fly likes Automating Inclusion of Required Ruby Modules in JRuby Jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Automating Inclusion of Required Ruby Modules in JRuby Jar" Watch "Automating Inclusion of Required Ruby Modules in JRuby Jar" New topic
Author

Automating Inclusion of Required Ruby Modules in JRuby Jar

Dan King
Ranch Hand

Joined: Mar 18, 2009
Posts: 84
Is it possible to automate the inclusion of required Ruby modules in (JRuby) jars? Currently, I'm manually copying module files into a 'lib' directory within the main project directory from which I create a jar. I posed this question on the jruby mailing list and I was advised that 'warbler' can automate the process. However, it appears 'warbler' automates the jar creation process, but not the inclusion of required module files.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Assuming that by modules you mean gems, then Bundler is your best bet:
http://gembundler.com/
Rails 3 ships with Bundler. If you're not using Rails 3, you can still install Bundler as a gem.

A normal bundle install will only save gems to your local system. However a bundle package will include the gems in the project itself:
http://gembundler.com/bundle_package.html

You will likely still use warbler but do so after running bundler.


A good workman is known by his tools.
 
Don't get me started about those stupid light bulbs.
 
subject: Automating Inclusion of Required Ruby Modules in JRuby Jar
 
Similar Threads
Ruby - App Server
Ruby
unable to run sample application in Struts2
JRuby benefits?
Ruby: the new Perl ? (syntax sugar that kills, too many ways to write stuff)