Warbler is a fantastic gem that compiles a Jruby project(Rails) to a deployable war file. Thanks to this stackoverflow question gives the required info.
However, running warble compiled war hides all the ruby source codes, which is fine. But it leaves other files like the Gemfile. Gemfile.lock etc files untouched.
Is there any way to compile these files too? Anything particular to be included in the config/warble.rb file that will compile these files too?
An additional, but more ambitious requirement is to not show the rails directory structure in the WEB-INF at all(we are going to distribute the compiled war file to the clients.) I not not very optimistic about this, but can the rails directory structure be hidden inside the WEB-INF directory?
I don't think that's possible. I used Warbler a lot back in the days and the only things that do with
compiledis to compile your source into java... Also, you cannot hide the rails folder structure because what is to simply change all require from .rb to .class and load the corresponding java compiled file.Are you using some java integration with JRuby? I mean, load some java lib in Ruby, otherwise you could try others way to compile your ruby to an executable like https://github.com/phusion/traveling-ruby