Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Protecting code and licensing for independently deployed Rails applications...?
4 Posts
Protecting code and licensing for independently deployed Rails applications...?

Hi All,

I'm writing a Rails application which will have reasonably regular updates -- nothing abnormal here. I face a problem, however, due to the distribution model. Basically the application will be sold for stand-alone "intranet" installation due to its "add-on" nature (it's basically a web interface for an existing, database-driven industry standard application).

My concern(s) then revolve(s) around protecting code and update models (registration codes, etc.) for multiple independently deployed Rails applications. Does anyone have a good starting point for reading up on this? Any input regarding such a process?


Your best bet here is probably to use JRuby to compile your application into a .jar file. Besides that, Ruby makes it pretty easy to bypass any sort of license authentication you have.

I've seen people use JRuby and encrypt the code. Remember there was an old confreaks (2007 I think - may have been in Ruby Hoedown lightning talks?) where someone was doing this but can't google it.

You could probably apply the same principle by doing some method overriding on the require method that decrypts stuff from a your Rails app (for example), but not sure how you'd hide the key from your users.

The googleholic in me found this, which might help you get started. Ruby to JRuby jar files: http://spin.atomicobject.com/2008/07/02/rolling-a-jruby-desktop-application

4 Posts
Login to add your message