# Compiler OR Obfuscator for RoR applications?

**URL:** <https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737>\
**Category:** Rails\
**Created:** [November 23, 2005, 11:18pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737 "2005-11-23T23:18:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 23, 2005, 11:18pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/1 "2005-11-23T23:18:23Z")

</div>

Hi folks,  
I’m a newbie in the Ruby land, The Ruby language and RoR looks really  
great but I think in my situation there is a problem, we are an ISV  
that sells web application and we don’t want our clients see our  
source code, I searched the web but couldn’t find any way to compile  
and\or obfuscate ruby code (in web (RoR)), is there such tool  
available for the language?

Thanks in advance for your help,  
Dunnil

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 23, 2005, 11:30pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/2 "2005-11-23T23:30:28Z")

</div>

Dunnil, An interesting approach is found at [http://moonbase.rydia.net/](http://moonbase.rydia.net/)  
mental/blog/programming/avoiding-ruby-keywords.html. As far as I  
understand, obfuscating source code has never been of great concern  
to the Ruby or Rails developers, or the majority of Ruby developers  
for that matter. If the need to obfuscate your source code takes  
primacy over your platform decision, I would advise you to look  
elsewhere at this time.

Jeremy

On Nov 23, 2005, at 2:14 PM, Human D. wrote:

> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Jeremy Voorhis, Lead Architect
- PLANET ARGON, Rails Development, Consulting & Hosting
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
- [www.planetargon.com](http://www.planetargon.com) | [www.jvoorhis.com](http://www.jvoorhis.com)
- Refactoring Rails | [www.refactoringrails.com](http://www.refactoringrails.com)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

Also Cokemachineglow | [www.cokemachineglow.com](http://www.cokemachineglow.com)

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 23, 2005, 11:34pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/3 "2005-11-23T23:34:29Z")

</div>

ROR code can be compiled…

See following tutorial:  
[http://www.erikveen.dds.nl/distributingrubyapplications/rails.html](http://www.erikveen.dds.nl/distributingrubyapplications/rails.html)

----- Original Message -----  
From: “Human D.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Wednesday, November 23, 2005 11:14 PM  
Subject: [Rails] Compiler OR Obfuscator for RoR applications?

Hi folks,  
I’m a newbie in the Ruby land, The Ruby language and RoR looks really  
great but I think in my situation there is a problem, we are an ISV  
that sells web application and we don’t want our clients see our  
source code, I searched the web but couldn’t find any way to compile  
and\or obfuscate ruby code (in web (RoR)), is there such tool  
available for the language?

Thanks in advance for your help,  
Dunnil

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 23, 2005, 11:42pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/4 "2005-11-23T23:42:32Z")

</div>

From the Ruby2Exe site:

RubyScript2Exe transforms your Ruby script into a standalone, compressed Windows, Linux or Mac OS X (Darwin) executable. You can look at it as a "compiler". Not in the sense of a source-code-to-byte- code compiler, but as a "collector", for it collects all necessary files to run your script on an other machine: the Ruby script, the Ruby interpreter and the Ruby runtime library (stripped down for this script). Anyway, the result is the same: a standalone executable (application.exe). And that's what we want!

This is a tool for packaging and distribution, but it is not a  
compiler. An end user could certainly extract the source code from it.

On Nov 23, 2005, at 2:33 PM, Mischa K. wrote:

> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Jeremy Voorhis, Lead Architect
- PLANET ARGON, Rails Development, Consulting & Hosting
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
- [www.planetargon.com](http://www.planetargon.com) | [www.jvoorhis.com](http://www.jvoorhis.com)
- Refactoring Rails | [www.refactoringrails.com](http://www.refactoringrails.com)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

Also Cokemachineglow | [www.cokemachineglow.com](http://www.cokemachineglow.com)

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 24, 2005, 12:02am UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/5 "2005-11-24T00:02:40Z")

</div>

Webrick and Sqlite seem to be your options - they are both good and  
fine within their limits, but you certainly won’t distribute anything  
large scale on this stack.

This really isn’t obfuscation - remember, it is also a fairly trivial  
task to disassemble .NET with the available tools and although I am  
not certain, I would imagine Java assemblies can be poked inside of  
as well.

On Nov 23, 2005, at 2:50 PM, Mischa K. wrote:

> A bigger problem might be that you might be stuck running WebRick
> 
> > From the Ruby2Exe site:
> > 
> > > [Distributing Rails Applications - A Tutorial](http://www.erikveen.dds.nl/distributingrubyapplications/rails.html)  
> > > really  
> > > removed\_email\_address@domain.invalid
> > 
> > - [www.planetargon.com](http://www.planetargon.com) | [www.jvoorhis.com](http://www.jvoorhis.com)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Jeremy Voorhis, Lead Architect
- PLANET ARGON, Rails Development, Consulting & Hosting
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
- [www.planetargon.com](http://www.planetargon.com) | [www.jvoorhis.com](http://www.jvoorhis.com)
- Refactoring Rails | [www.refactoringrails.com](http://www.refactoringrails.com)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

Also Cokemachineglow | [www.cokemachineglow.com](http://www.cokemachineglow.com)

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 23, 2005, 11:50pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/6 "2005-11-23T23:50:35Z")

</div>

Compressed distribution sounds like what is asked for 🙂  
It’s a huge step up though from text files which everyone can read 🙂

and … if you have a .exe file on the windows platform there are  
multiple  
exe compressors to run over it, I’m sure there are tools for the other  
platforms as well.

Not sure how much trouble you would want to go to protect the contents  
though.

A bigger problem might be that you might be stuck running WebRick as a  
webserver…

----- Original Message -----  
From: “Jeremy Voorhis” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Wednesday, November 23, 2005 11:40 PM  
Subject: Re: [Rails] Compiler OR Obfuscator for RoR applications?

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 24, 2005, 12:30am UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/7 "2005-11-24T00:30:51Z")

</div>

A python solution is probably closer to what you want. The django  
project ([http://djangoproject.com](http://djangoproject.com)) has just released its first public  
version of its framework, and it addresses many of the same problems  
that Ruby on Rails does. You probably won’t find many people here that  
prefer Python over Ruby (I much prefer Ruby), but Django is well  
implemented and Python can be distributed as compiled code.

In truth, the business model that you are describing seems better  
suited to the [asp.net](http://asp.net) concept of compiled intermediate code, - but  
then you are stuck with the .net platform, and all that it implies ☹

–  
[www.channel200.net](http://www.channel200.net)

aim: removed\_email\_address@domain.invalid  
jabber/googletalk: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 25, 2005, 1:29pm UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/8 "2005-11-25T13:29:08Z")

</div>

Thanks guys,  
Seems I should wait for R2.0

---

<div class="post-metadata">

**Author:** ![h.dunnil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@h.dunnil](https://www.ruby-forum.com/u/h.dunnil)\
**Post date:** [November 24, 2005, 1:47am UTC](https://www.ruby-forum.com/t/compiler-or-obfuscator-for-ror-applications/48737/9 "2005-11-24T01:47:21Z")

</div>

On Wednesday 23 November 2005 16:59, Jeremy Voorhis wrote:

> Webrick and Sqlite seem to be your options - they are both good and  
> fine within their limits, but you certainly won’t distribute anything  
> large scale on this stack.
> 
> This really isn’t obfuscation - remember, it is also a fairly trivial  
> task to disassemble .NET with the available tools and although I am  
> not certain, I would imagine Java assemblies can be poked inside of  
> as well.

Well, there is the dotfuscator. It does a good job of mixing everything  
in  
your intermediate language code to confuse everyone (probably the  
computer  
too).

But really, “compiling” your ruby app with rubyscript2exe will lend a  
single  
executable. But when you run it, if you check in the /tmp directory,  
you’ll  
find a folder that contains all your code. They do have to be smart  
enough  
to check there though.

If you wait until Ruby 2.0 we’ll all be byte compiled. Still poke-able,  
but  
not nearly as much.
