1

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?

alain.janinm
  • 19,951
  • 10
  • 65
  • 112
hashpipe
  • 305
  • 3
  • 16
  • Related questions: http://stackoverflow.com/questions/99553/can-you-distribute-a-ruby-on-rails-application-without-source http://stackoverflow.com/questions/1515012/possible-to-convert-ruby-script-to-exe-so-that-source-code-not-visible – Andrew Grimm Dec 03 '09 at 07:35
  • Not sure why you would want to hide source code from the client who's paying for it. Or am I missing something? ;-) – Mike Woodhouse Dec 03 '09 at 11:16
  • Another related question: http://stackoverflow.com/questions/1640342/protecting-ruby-code – Andrew Grimm Jul 01 '11 at 10:40

2 Answers2

8

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
  • 387
  • 1
  • 2
  • 8
  • 1
    Strongly agree with Julian. This is one situation where lawyers actually are quite useful. – Mike Dec 03 '09 at 16:41
6

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
  • 1,173
  • 1
  • 6
  • 8