# Compile to exe to hide source code

**URL:** <https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304>\
**Category:** Ruby\
**Created:** [March 30, 2006, 2:01am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304 "2006-03-30T02:01:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c37758/32.png) [@blair](https://www.ruby-forum.com/u/blair)\
**Post date:** [March 30, 2006, 2:01am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304/1 "2006-03-30T02:01:42Z")

</div>

Hi,

I want to hide my source code under Windows, so I tought that compiling  
to an executable file would solve the problem. But I didn’t found a way  
to do it with Ruby. I have tried 2 solutions:  
Exerb – If you read the ‘exe’ file, you can see the source code  
directly.  
Ruby2exe – The complete source is copied temporarily under the %TEMP%  
directory.

Does somebody have a way to deploy a file while hiding the source code?  
I know that there is a decompiler for a lot of compilers, but I want to  
be able to make it harder for people to see the source code (not as easy  
as looking to a temporary directory or reading directly an ‘exe’ file).

Thanks

---

<div class="post-metadata">

**Author:** ![blair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c37758/32.png) [@blair](https://www.ruby-forum.com/u/blair)\
**Post date:** [March 30, 2006, 2:10am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304/2 "2006-03-30T02:10:51Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Eric B. wrote:

> I know that there is a decompiler for a lot of compilers, but I want to  
> be able to make it harder for people to see the source code (not as easy  
> as looking to a temporary directory or reading directly an ‘exe’ file).

This has been talked abot _alot_ on this list. You can search archives  
for indepth discussions.

Zach  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.1 (GNU/Linux)  
Comment: Using GnuPG with Thunderbird - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iD8DBQFEKyKKMyx0fW1d8G0RAtA1AJwOv9p046Gaq/miU7/rgiN8tXD5YgCbB3Ne  
QPMp9JlybQ5sfMmOKbPSKQE=  
=OnSU  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![blair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c37758/32.png) [@blair](https://www.ruby-forum.com/u/blair)\
**Post date:** [March 30, 2006, 2:34am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304/3 "2006-03-30T02:34:59Z")

</div>

Eric B. wrote:

> I know that there is a decompiler for a lot of compilers, but I want to  
> be able to make it harder for people to see the source code (not as easy  
> as looking to a temporary directory or reading directly an ‘exe’ file).
> 
> Thanks

This is a frequently asked question. There is currently no way to do  
this with Ruby.

---

<div class="post-metadata">

**Author:** ![blair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c37758/32.png) [@blair](https://www.ruby-forum.com/u/blair)\
**Post date:** [March 30, 2006, 7:19am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304/4 "2006-03-30T07:19:31Z")

</div>

Will the efforts at making a Ruby VM help here? I understand that Ruby  
2.0 will use bytecode.

What about the current alternate implementations of Ruby (such as the  
Java based ones, and the VM based ones) - could they help?
