0

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?

Novneet Nov
  • 592
  • 1
  • 7
  • 22
  • Files like Gemfile and such are read and parsed by bundler. You certainly CAN do it. But how far do you go, monkey patching the libraries that read those plain text files? – Ruslan Aug 02 '17 at 18:20

1 Answers1

0

I don't think that's possible. I used Warbler a lot back in the days and the only things that do with compiled is 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

Luke
  • 3,381
  • 1
  • 20
  • 20