views:

204

answers:

2

I am in the middle of developing an enterprise application using RoR (first time for us to build an enterprise app on RoR instead of Java), and while we do not have that much problem of obscuring the source code, I was still wondering if this was possible. Whether we could somehow just have a simple EXE or something else, such that our code base remains hidden from the client.

Has anybody done anything like this or any way whether something like this could be achieved?

+4  A: 

You can "compile" your RoR application with JRuby in order to run it on a JVM (an idea here: http://answers.oreilly.com/topic/434-how-to-package-a-ruby-on-rails-application-for-java-ee/).

PS: take care at which gems you use, some of them may need to native support (so "recompiled" on the JVM)

Carlo Pecchia
http://isitjruby.com/ is one site for determining if a gem is compatible.
Andrew Grimm
+7  A: 

Obscuring the source code is a bad idea. It makes debugging the client's (inevitable) problems a lot harder, fixing them in place all but impossible, and it even makes it harder to get useful bug tickets, because the stack traces will be full of unreadable garbage. Ultimately, it's futile - any program can be decompiled with enough effort.

This is a problem best solved with lawyers. A well-written contract should be all you need to prevent them copying your code.

Julian Morrison
Strongly agree with Julian. This is one situation where lawyers actually are quite useful.
Mike