# Anyone use rubyscript2exe to change app to .exe?

**URL:** <https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364>\
**Category:** Ruby-Gnome 2\
**Created:** [May 1, 2008, 8:35am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364 "2008-05-01T08:35:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 8:35am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/1 "2008-05-01T08:35:23Z")

</div>

hi. I want to make .exe that can run in other computer in my app that I  
use ruby-gnome2 GUI.

I follow this guide  
[http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips\_rubyscript2exe](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_rubyscript2exe)  
in ‘rubyscript2exe on Windows, solution 2’

first I create folder “new” that contain 2 file

- init.rb (helloworld.rb in example file and add some code that want use  
when make to .exe)
- folder name “run\_dep” that contain 3 folder [etc/ lib/ share/] that I  
copy from C:/ruby/lib/GTK/

and then I create .exe by

- rubyscript2exe new/

then it show me helloworld button that can work normally so I close it  
to make .exe and when create success I open it but it can’t read font at  
button. it show some error.( **see firse picture** )

and in another app I use gdk::… It can’t open 😢 what I doing  
wrong…

note : I use ruby-gnome2-0.16.0-1-i386-mswin32.exe only to install GTK  
for ruby. so I don’t have folder C:/GTK/. maybe it’s cause of error???

and I try to uninstall and install gtk-dev-2.10.11-win32-1.exe that has  
glade32 and when I complie my app with SciTE (when I install ruby-gnome2  
it can run normally) It can’t compile and run!!!(**see  
second picture**)  
has some error. I don’t know how to set path and I try this about 1  
week. I still can’t make it please help me :'(((((

first picture  
[![](http://img2.smileupload.com/upload_pic/01-05-2551/01mbsd_01052551133412.jpg) ](http://img2.smileupload.com/upload_pic/01-05-2551/01mbsd_01052551133412.jpg)

second picture  
[![](http://img2.smileupload.com/upload_pic/01-05-2551/01met5_01052551133435.jpg) ](http://img2.smileupload.com/upload_pic/01-05-2551/01met5_01052551133435.jpg)

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 9:15am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/2 "2008-05-01T09:15:35Z")

</div>

Mathieu B. wrote:

> Hi,
> 
> This is not an answer to your problem but this is somewhat related. In  
> my application Fantasdic, I took a different approach. I created a  
> self-contained archive including Ruby, Gtk, RG2 and my application.  
> Everything uses relative path so you can unzip it anywhere.
> 
> The good thing about it is that my application starts almost  
> instantaneously. This is because, everything is already in place,  
> unlike with rubyscript2exe, which has to unzip the content contained  
> in the executable. The downside is that my archive is quite large. I  
> didn’t even try to reduce the size of the archive though. Some ideas  
> to reduce space: remove GTK translation files, remove unused Ruby  
> libraries.
> 
> If this approach is interesting for you, I think you could use my  
> archive as a starting point and replace my application with yours.
> 
> [http://www.gnome.org/projects/fantasdic/](http://www.gnome.org/projects/fantasdic/)
> 
> HTH,  
> Mathieu
> 
> 2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

your fantasdic is work! Can you tell me step of creating gnome to exe.  
you use rubyscript2exe?? and what’s gnome version you use? sorry for my  
bad english.

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 8:56am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/3 "2008-05-01T08:56:13Z")

</div>

Hi,

This is not an answer to your problem but this is somewhat related. In  
my application Fantasdic, I took a different approach. I created a  
self-contained archive including Ruby, Gtk, RG2 and my application.  
Everything uses relative path so you can unzip it anywhere.

The good thing about it is that my application starts almost  
instantaneously. This is because, everything is already in place,  
unlike with rubyscript2exe, which has to unzip the content contained  
in the executable. The downside is that my archive is quite large. I  
didn’t even try to reduce the size of the archive though. Some ideas  
to reduce space: remove GTK translation files, remove unused Ruby  
libraries.

If this approach is interesting for you, I think you could use my  
archive as a starting point and replace my application with yours.

[http://www.gnome.org/projects/fantasdic/](http://www.gnome.org/projects/fantasdic/)

HTH,  
Mathieu

2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 9:52am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/4 "2008-05-01T09:52:28Z")

</div>

Mathieu B. wrote:

> 2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > your fantasdic is work! Can you tell me step of creating gnome to exe.  
> > you use rubyscript2exe?? and what’s gnome version you use? sorry for my  
> > bad english.
> 
> I didn’t use rubyscript2exe. As I said, this is simply an archive  
> containing everything necessary. People just have to unzip and that’s  
> it! The trick is that it uses relative paths.
> 
> - Remove fantasdic and put your application instead
> - Your main ruby file must add the directory of the extensions to  
> $LOAD\_PATH (see lib/fantasdic/bin/fantasdic and you’ll see)
> - You must adjust the path to your main rb file in  
> lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.
> 
> I would think those are the only things you need to change in my  
> archive.
> 
> Mathieu

I confuse with it 😢

first, I copy my init.rb to new folder that I copy from fandastic and  
rename file to fandastic like this.  
[http://img2.smileupload.com/upload\_pic/01-05-2551/01xpkf\_01052551144611.jpg](http://img2.smileupload.com/upload_pic/01-05-2551/01xpkf_01052551144611.jpg)

and “Your main ruby file must add the directory of the extensions to  
$LOAD\_PATH” I don’t understand this 😢 my directory that show file  
above is ‘D:\ruby2\fantasdic’) what I must do with fantasdic file?? what  
line??

and “You must adjust the path to your main rb file in  
lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.”  
I have devc++ and I open that file . but I don’t how where I adjust path  
to my rb file 😢 please help me again.

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 11:03am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/5 "2008-05-01T11:03:58Z")

</div>

Hum, I don’t want to be mean but you need to search a little bit more  
by yourself. I gave you all the details that you need in my previous  
email. You won’t get everything to work in 5 minutes. Just relax and  
try to understand how everything works 🙂

Mathieu

2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 11:34am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/6 "2008-05-01T11:34:22Z")

</div>

Mathieu B. wrote:

> Hum, I don’t want to be mean but you need to search a little bit more  
> by yourself. I gave you all the details that you need in my previous  
> email. You won’t get everything to work in 5 minutes. Just relax and  
> try to understand how everything works 🙂
> 
> Mathieu
> 
> 2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

OK. I will try 😑

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [May 1, 2008, 9:33am UTC](https://www.ruby-forum.com/t/anyone-use-rubyscript2exe-to-change-app-to-exe/136364/7 "2008-05-01T09:33:39Z")

</div>

2008/5/1 Pat K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> your fantasdic is work! Can you tell me step of creating gnome to exe.  
> you use rubyscript2exe?? and what’s gnome version you use? sorry for my  
> bad english.

I didn’t use rubyscript2exe. As I said, this is simply an archive  
containing everything necessary. People just have to unzip and that’s  
it! The trick is that it uses relative paths.

- Remove fantasdic and put your application instead
- Your main ruby file must add the directory of the extensions to  
$LOAD\_PATH (see lib/fantasdic/bin/fantasdic and you’ll see)
- You must adjust the path to your main rb file in  
lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.

I would think those are the only things you need to change in my  
archive.

Mathieu
