Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Automating Inclusion of Required Ruby Modules in JRuby Jar

 
Dan King
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic