# Re: Question: Ruby application packaging

**URL:** <https://www.ruby-forum.com/t/re-question-ruby-application-packaging/71758>\
**Category:** Ruby\
**Created:** [October 11, 2006, 10:46am UTC](https://www.ruby-forum.com/t/re-question-ruby-application-packaging/71758 "2006-10-11T10:46:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CameronS\_Gemma\_SUK](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/45deac/32.png) [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Post date:** [October 11, 2006, 10:46am UTC](https://www.ruby-forum.com/t/re-question-ruby-application-packaging/71758/1 "2006-10-11T10:46:13Z")

</div>

Try rubysript2exe. It’s extremely easy to use in my opinion. ( : Just  
what I wanted/needed, maybe it could be for you too…?

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

In case you’re getting too bogged down trudging through that document.  
This packages up all the bits of ruby and the gems that you have used,  
but if you have used tk then try the parameter --rubyscript2exe-tk  
below:

\*\*\* Please accept my apologies for any poor formatting below… \*\*\*

1. Place all required files in a folder and rename the entry point  
of your application to init.rb. RubyScript2Exe complains if it can’t  
find application/init.rb.  
a. Note: If the extension is “rb”, a DOS box will pop up. If the  
extension is “rbw”, no DOS box will pop up. Unless it is overwritten by  
a parameter.
2. Open a command prompt where the rubyscript2exe.rb file is  
located and use:

c:\home\erik\> ruby rubyscript2exe.rb application.rb[w] [parameters]  
or  
c:\home\erik\> ruby rubyscript2exe.rb application[/] [parameters]

EXAMPLE: c:\ruby\bin\> ruby rubyscript2exe.rb c:/scriptmigration/  
–rubyscript2exe-tk

Parameter Description  
–rubyscript2exe-rubyw Avoid the popping up of a DOS box. (It’s  
annoying in the test  
period… No puts and p  
anymore… Only use it for  
distributing your application.  
See Logging.)  
–rubyscript2exe-ruby Force the popping up of a DOS box  
(default).  
–rubyscript2exe-nostrip Avoid stripping. The binaries (ruby and  
\*.so) on Linux and Darwin  
are stripped by default to  
reduce the size of the  
resulting executable.  
–rubyscript2exe-strace Start the embedded application with  
strace (Linux only, for debugging only).  
–rubyscript2exe-tk (experimental) Embed not only the Ruby  
bindings for TK, but TK itself as well.  
–rubyscript2exe-verbose Verbose mode.  
–rubyscript2exe-quiet Quiet mode.

When using --rubyscript2exe-tk, it’s probably a good idea to add exit if  
RUBYSCRIPT2EXE.is\_compiling? (see is\_compiling?) just before  
Tk.mainloop:

Gem
