Can JRuby be used to "compile" or "encrypt" code?

Coming from PHP, I'm used to seeing things like Zend Encoder that can take PHP and pseudo-compile it, obscuring the source (useful in the event you want to sell a product written in said language). I haven't found a direct equivalent with Ruby (though if you know of one I'd like to hear about it), but it occurs to me that JRuby might be used to do something similar.

The idea is that I'd like to write a Rails application, "compile" or "encrypt" it as a WAR file for distribution, and be able to do so without disclosing the source code to some one (for commercial purposes). Can JRuby do that?

Supposedly that's how github:fi (https://github.com/blog/441- announcing-github-fi ) works

Fred

Yes, you can compile Ruby classes as Java classes with jrubyc.

Warbler lets you use this feature for Rails applications easily, take a look at the README file:

https://github.com/nicksieger/warbler