# Ruby/Tk and rubyscript2exe problem

**URL:** <https://www.ruby-forum.com/t/ruby-tk-and-rubyscript2exe-problem/112684>\
**Category:** Ruby\
**Created:** [August 22, 2007, 3:48am UTC](https://www.ruby-forum.com/t/ruby-tk-and-rubyscript2exe-problem/112684 "2007-08-22T03:48:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Vernarsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_Vernarsky](https://www.ruby-forum.com/u/Brian_Vernarsky)\
**Post date:** [August 22, 2007, 3:48am UTC](https://www.ruby-forum.com/t/ruby-tk-and-rubyscript2exe-problem/112684/1 "2007-08-22T03:48:23Z")

</div>

Hello, I am trying to compile a standalone exe file from a program  
that I have written using ruby/tk. It runs completely fine from the  
command line, but when I try to compile it I get the a message stating  
that there is a problem in “…ruby/lib/ruby/1.8/tk.rb:1102”  
specifically

“tcltklib:fail to Tk.Init(). invalid command name “tcl\_findLibrary”  
(RuntimeError)”

thus when I try to run the program it says that there is no gem “tk”  
to load and it does not run. Any suggestions on how to fix this?

Brian

---

<div class="post-metadata">

**Author:** ![Brian\_Vernarsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_Vernarsky](https://www.ruby-forum.com/u/Brian_Vernarsky)\
**Post date:** [August 22, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/ruby-tk-and-rubyscript2exe-problem/112684/2 "2007-08-22T16:51:34Z")

</div>

Tried this?  
rubyscript2exe mycoolprogram.rbw --rubyscript2exe-tk  
–rubyscript2exe-rubyw

Gregor

---

<div class="post-metadata">

**Author:** ![Brian\_Vernarsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_Vernarsky](https://www.ruby-forum.com/u/Brian_Vernarsky)\
**Post date:** [August 22, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/ruby-tk-and-rubyscript2exe-problem/112684/3 "2007-08-22T17:41:43Z")

</div>

Yes I have tried using the “rubyscript2exe mycoolprogram.rbw  
–rubyscript2exe-tk --rubyscript2exe-rubyw” setup, but it doesn’t  
really seem to make a difference. It still runs into problems when it  
tries to read the file tk.rb, so I assume that the problem is there.  
I suppose I could just try adding Tk.Init() to the tk.rb file, but I  
wasn’t sure if that would help.

Brian
