# I use exerb to generate exe file,but it doesnt work

**URL:** <https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992>\
**Category:** Ruby\
**Created:** [April 6, 2008, 7:55am UTC](https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992 "2008-04-06T07:55:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oztoto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7ea924/32.png) [@oztoto](https://www.ruby-forum.com/u/oztoto)\
**Post date:** [April 6, 2008, 7:55am UTC](https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992/1 "2008-04-06T07:55:48Z")

</div>

my program is just

puts “hello world”

I use exerb to generate exe file,  
“exerb a.rb”  
it generate a exe file: a.exe  
when i enter it  
nothing happen  
I just see a cmd windows flash  
why?

my  
exerb is 4.2  
ruby 1.8.5  
windows XP

---

<div class="post-metadata">

**Author:** ![oztoto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7ea924/32.png) [@oztoto](https://www.ruby-forum.com/u/oztoto)\
**Post date:** [April 6, 2008, 9:28am UTC](https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992/2 "2008-04-06T09:28:45Z")

</div>

Toto T. wrote:

> nothing happen  
> I just see a cmd windows flash  
> why?
> 
> my  
> exerb is 4.2  
> ruby 1.8.5  
> windows XP

I haven’t used exerb but I think you may need to run a.exe from the  
command line. It sounds like you’re double clicking on it in Windows.

If I understand it correctly, you click on the file name, it opens a  
command window, prints “hello world” and exits the program, therefore  
closing the command window after that.

Cheers  
Mohit.

---

<div class="post-metadata">

**Author:** ![oztoto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7ea924/32.png) [@oztoto](https://www.ruby-forum.com/u/oztoto)\
**Post date:** [April 6, 2008, 10:11am UTC](https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992/3 "2008-04-06T10:11:26Z")

</div>

Mohit S. wrote:

> > when i enter it

Yes - and if this is happening, simply open a command window first, then  
launch your exe file from the command line - “ruby {name}.exe”. The  
command window should remain open upon program termination.

t.

–

```auto
Tom C., MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< removed_email_address@domain.invalid >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)

```

---

<div class="post-metadata">

**Author:** ![oztoto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7ea924/32.png) [@oztoto](https://www.ruby-forum.com/u/oztoto)\
**Post date:** [April 6, 2008, 11:00am UTC](https://www.ruby-forum.com/t/i-use-exerb-to-generate-exe-file-but-it-doesnt-work/133992/4 "2008-04-06T11:00:44Z")

</div>

Mohit S. wrote:

> Toto T. wrote:
> 
> > nothing happen  
> > I just see a cmd windows flash  
> > why?
> > 
> > my  
> > exerb is 4.2  
> > ruby 1.8.5  
> > windows XP
> 
> I haven’t used exerb but I think you may need to run a.exe from the  
> command line. It sounds like you’re double clicking on it in Windows.
> 
> If I understand it correctly, you click on the file name, it opens a  
> command window, prints “hello world” and exits the program, therefore  
> closing the command window after that.
> 
> Cheers  
> Mohit.

It works.

Thank you very much.

^-^
