# Add GTK/lib/\* when run .exe that created from rubyscript2exe

**URL:** <https://www.ruby-forum.com/t/add-gtk-lib-when-run-exe-that-created-from-rubyscript2exe/136460>\
**Category:** Ruby-Gnome 2\
**Created:** [May 2, 2008, 10:43am UTC](https://www.ruby-forum.com/t/add-gtk-lib-when-run-exe-that-created-from-rubyscript2exe/136460 "2008-05-02T10:43:23Z")\
**Posts on this page:** 1\
**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 2, 2008, 10:43am UTC](https://www.ruby-forum.com/t/add-gtk-lib-when-run-exe-that-created-from-rubyscript2exe/136460/1 "2008-05-02T10:43:23Z")

</div>

hi, I almost make .exe with ruby-GNOME2 GUI by rubyscript2exe. I can  
make .exe file that can run anywhere in my computer now. but I have one  
problem when I run in other computer it show me error message like this.

\app\init.rb:239:in `set\_icon’: Unable to load image-loading module:  
c:/Ruby/lib/GTK/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll: The  
specified module could not be found. (Gdk::PixbufError)

then I make new folder name ‘Ruby’ in drive C and then I copy  
‘lib/GTK/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll’ from my  
computer and paste in it. so it has ‘libpixbufloader-png.dll’ file in  
‘c:/Ruby/lib/GTK/lib/gtk-2.0/2.10.0/loaders/’ that is cause of this  
problem

then I run my program it work fine. but I want only one files that can  
run in any computer. I think when I run my program it will find  
‘libpixbufloader-png.dll’ in  
‘c:/Ruby/lib/GTK/lib/gtk-2.0/2.10.0/loaders/’ because in line 239 that  
has problem I use

window.set\_icon($icon)  
that $icon is “/logo.png”

so it can’t show icon in top-left window it can’t run!  
but I don’t want it find ‘libpixbufloader-png.dll’ file in  
‘c:/Ruby/lib/GTK/lib/gtk-2.0/2.10.0/loaders/’ I use this guide for make  
.exe file

> [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips\_rubyscript2exe](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_rubyscript2exe)  
> on rubyscript2exe on Windows, solution 2

I do follow this step and when I run my program. 'C:\Documents and  
Settings\Sasitorny\eee\eee.make\_gtk2.exe.5' is folder that it unzipped  
all embbed file in. It has

C:\Documents and  
Settings\Sasitorny\eee\eee.make\_gtk2.exe.5\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll  
!!!

I embbed them into my program but it still find  
‘libpixbufloader-png.dll’ in  
‘c:/Ruby/lib/GTK/lib/gtk-2.0/2.10.0/loaders/’. Why??? not only  
‘libpixbufloader-png.dll’ but also all file of GTK (example: pango) it  
will find in ‘c:/Ruby/lib/GTK/lib/’ that any computer don’t has ruby  
program and GTK install :'((((

please help me I still try it for a long time.  
see my picture for detail 😢
