# Re: Protecting commercial ruby source code

**URL:** <https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313>\
**Category:** Ruby\
**Created:** [November 17, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313 "2006-11-17T16:00:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad7a0](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/53a042/32.png) [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Post date:** [November 17, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313/1 "2006-11-17T16:00:20Z")

</div>

> Hiren B. wrote:

> Is there a way to obfuscate my ruby source code. I have come across  
> ZenObfuscate which at \> about $2500. Does anyone know of any other  
> options to  
> protect ruby source code when it is \> distributed to clients?

This question comes up a lot. Can you make it a web-based application so  
that  
the code is never distributed? IMO, that’s the only real way to deal  
with this.

There really is no 100% way in which to obfuscate code. You can raise  
the bar of  
course, but if a determined client who is technically minded gets the  
code, they  
can undo any obfuscation you’ve done. Personally, I think it’s a bad  
idea and if  
you’re having to ask the question, then something is fundamentally wrong  
with  
your business model.

---

<div class="post-metadata">

**Author:** ![brad7a0](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/53a042/32.png) [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Post date:** [November 17, 2006, 4:12pm UTC](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313/2 "2006-11-17T16:12:23Z")

</div>

On 11/17/06, Brad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> that  
> with  
> your business model.

Agree completely on the point about not being able to obfuscate code  
100%.  
Hosting software yourself solves a lot of interesting problems  
(including  
some OSS licensing issues) but opens a different set of potential  
problems:

1. some clients are not comfortable unless they host private data  
themselves; 2) some clients have legal constraints requiring them to  
host  
themselves; 3) you might become a target for government action if you’re  
hosting any kind of data on behalf of a client.

I think it’s too broad to say that there are fundamental problems with  
_any_  
business model that benefits from code obfuscation, but it’s definitely  
true  
that software in Ruby is going to be wide open and easily visible to  
users,  
compared to some other languages. And that will be a disadvantage for  
some  
people.

---

<div class="post-metadata">

**Author:** ![brad7a0](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/53a042/32.png) [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Post date:** [November 17, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/re-protecting-commercial-ruby-source-code/76313/3 "2006-11-17T17:10:37Z")

</div>

Quoting Francis C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Agree completely on the point about not being able to obfuscate code 100%.  
> Hosting software yourself solves a lot of interesting problems (including  
> some OSS licensing issues) but opens a different set of potential problems:
> 
> 1. some clients are not comfortable unless they host private data  
> themselves; 2) some clients have legal constraints requiring them to host  
> themselves; 3) you might become a target for government action if you’re  
> hosting any kind of data on behalf of a client.

Would it be possible to host the app remotely and then store user  
specific data  
locally on the clients’ computers? No need to obfuscate user data,  
right?

> I think it’s too broad to say that there are fundamental problems with _any_  
> business model that benefits from code obfuscation…

You’re right. I was grasping there. I really meant to say that perhaps  
he should  
step back and ask why he’s having to ask this question.
