# Code Protection

**URL:** <https://www.ruby-forum.com/t/code-protection/104775>\
**Category:** Rails\
**Created:** [May 22, 2007, 12:19pm UTC](https://www.ruby-forum.com/t/code-protection/104775 "2007-05-22T12:19:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 22, 2007, 12:19pm UTC](https://www.ruby-forum.com/t/code-protection/104775/1 "2007-05-22T12:19:09Z")

</div>

Hi everyone!

The project which I’m working on is going to be installed in several  
clients side.  
Do you know if it exists any way of protecting our code?

Thanks a lot in advance!

Monica

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 22, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/code-protection/104775/2 "2007-05-22T19:45:11Z")

</div>

As of now I don’t believe there are any ways to obfuscate or compile  
Rails  
applications. This is why most people host the applications instead of  
installing to client sites.

This has been discussed before… I suggest searching the archives for  
some  
really good discussions about this topic.

-Brian

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 22, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/code-protection/104775/3 "2007-05-22T22:52:32Z")

</div>

Here is one method of compiling Ruby. I haven’t used it and would be  
interested in hearing from anyone who has:

[http://www.erikveen.dds.nl/rubyscript2exe/index.html](http://www.erikveen.dds.nl/rubyscript2exe/index.html)

Regards,  
Dave

* * *

Information and Educational Technology  
Kwantlen University College - 604-599-2120  
“So powerful is the light of unity that it can illuminate the whole  
earth.” --BahÃ¡'u’llÃ¡h

removed\_email\_address@domain.invalid wrote on 22-05-2007 10:37:20 AM:

> As of now I don’t believe there are any ways to obfuscate or  
> compile Rails applications. This is why most people host the  
> applications instead of installing to client sites.
> 
> This has been discussed before… I suggest searching the archives  
> for some really good discussions about this topic.
> 
> -Brian

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 22, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/code-protection/104775/4 "2007-05-22T22:57:33Z")

</div>

I’ve used this several times; it’s a great way of packaging a  
Windows-based Ruby app into a single EXE file. I’ve used this  
capability as a selling point for getting Ruby into various places  
that I’ve worked.

However, it’s not appropriate for “hiding” source code - anyone with  
an editor can open the EXE file and find the source without  
difficulty.

Regards

Dave M.

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 23, 2007, 12:29am UTC](https://www.ruby-forum.com/t/code-protection/104775/5 "2007-05-23T00:29:41Z")

</div>

On 5/23/07, David M. wrote:

> However, it’s not appropriate for “hiding” source code - anyone with  
> an editor can open the EXE file and find the source without  
> difficulty.

And even without an editor! From the obfuscation point of view, it  
works just like a zip file…

[http://www.erikveen.dds.nl/rubyscript2exe/index.html#appdir](http://www.erikveen.dds.nl/rubyscript2exe/index.html#appdir)

- H

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 23, 2007, 12:34am UTC](https://www.ruby-forum.com/t/code-protection/104775/6 "2007-05-23T00:34:54Z")

</div>

Thanks to everyone for your posts!!

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 23, 2007, 12:21pm UTC](https://www.ruby-forum.com/t/code-protection/104775/7 "2007-05-23T12:21:37Z")

</div>

No it will not “speed up” rails app. ruby2exe doesn’t create native  
byte code, it merely compresses the files and copies ruby and other  
required lib in one package.

On 5/23/07, Mohit S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > capability as a selling point for getting Ruby into various places  
> > On 23/05/07, David D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > Kwantlen University College - 604-599-2120
> > > 
> > > > for some really good discussions about this topic.  
> > > > The project which I’m working on is going to be installed in several
> > 
> > >
> 
> >

–  
rm -rf / 2\>/dev/null - [http://null.in](http://null.in)

Dont judge those who try and fail, judge those who fail to try…

---

<div class="post-metadata">

**Author:** ![monica](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@monica](https://www.ruby-forum.com/u/monica)\
**Post date:** [May 23, 2007, 11:02am UTC](https://www.ruby-forum.com/t/code-protection/104775/8 "2007-05-23T11:02:29Z")

</div>

Has this been tried to see if it “speeds up” a Rails app (specially on  
Windows)?

Cheeers  
Mohit
