# Executable

**URL:** <https://www.ruby-forum.com/t/executable/83771>\
**Category:** Ruby\
**Created:** [January 29, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/executable/83771 "2007-01-29T17:11:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/executable/83771/1 "2007-01-29T17:11:09Z")

</div>

How do you make an executable file in Ruby? What software does one use  
with it?

---

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/executable/83771/2 "2007-01-29T17:26:13Z")

</div>

Assuming I did not completely misunderstand what you are asking…

1. Put the following as the first line in your ruby file:  
#!/usr/bin/env ruby

2. Grant execute permissions to your file with the following command:  
chmod +x my\_file.rb

---

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/executable/83771/3 "2007-01-29T17:30:14Z")

</div>

> > How do you make an executable file in Ruby? What software does one  
> > use  
> > with it?

How does one update the Ruby FAQ? Does everything have to go through  
Dave?

---

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/executable/83771/4 "2007-01-29T17:47:16Z")

</div>

Hi –

On Tue, 30 Jan 2007, Andy L. wrote:

> > > How do you make an executable file in Ruby? What software does one use  
> > > with it?
> 
> How does one update the Ruby FAQ? Does everything have to go through Dave?

The current FAQ is on [rubygarden.org](http://rubygarden.org). As of this moment it’s down…  
due to some memory-hog problems, but we’re working on it.

There’s also an old FAQ on [rubycentral.com](http://rubycentral.com). I’ve tried to contact the  
registrants of that address, in the hope of getting it transferred to  
Ruby Central (it’s currently registered with Pearson publishing), but  
have had no luck by phone or email.

Unfortunately, this has caused confusion, since lots of links to the  
old FAQ are still in circulation.

And, without doubt, the content needs some attention anyway. There’s  
a FAQ suggestion facility, but since it’s down right now, it’s not  
available. Stay tuned…

David

---

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/executable/83771/5 "2007-01-29T18:12:33Z")

</div>

Thanks that’s what I should have asked. The tutorial bundle only  
explains how to do if you’re using linux or unix.

Rae

On Jan 29, 11:41 am, Emmanuel O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Rae](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c37758/32.png) [@Rae](https://www.ruby-forum.com/u/Rae)\
**Post date:** [January 29, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/executable/83771/6 "2007-01-29T17:41:56Z")

</div>

Rae wrote:

> How do you make an executable file in Ruby? What software does one use  
> with it?

If you wish to do an executable in windows envioment, check out

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

Is not posible to compile ruby to and exe or even to bytecode (like  
java’s jar files), but the solution i pointed you to, generates an exe  
with the interpreter plus every library your program uses into a single  
exe. It works pretty well.
