# Problem using 'AllInOneRuby' with Tk-Program (Windows 2000 a

**URL:** <https://www.ruby-forum.com/t/problem-using-allinoneruby-with-tk-program-windows-2000-a/82971>\
**Category:** Ruby\
**Created:** [January 22, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/problem-using-allinoneruby-with-tk-program-windows-2000-a/82971 "2007-01-22T20:17:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wonado](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wonado](https://www.ruby-forum.com/u/wonado)\
**Post date:** [January 22, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/problem-using-allinoneruby-with-tk-program-windows-2000-a/82971/1 "2007-01-22T20:17:27Z")

</div>

Hi!

We found a problem using ‘AllInOneRuby’ with Tk-Program on Windows 2000  
and XP.

‘Tcl/Tk’ does work, a generated ‘allinoneruby.exe’ works well with a  
console  
program, but gives an error using a small Tk example.

> > > > > Code \>\>\>\>\>

require ‘tk’  
root = TkRoot.new{title “My Hello”}  
TkLabel.new(root) do  
text ‘Hier kommt Otto!’  
pack{padx 15; pady 15; side ‘left’}  
end  
Tk.mainloop

> > > > > Console Protocol \>\>\>\>\>

E:\AllInOneRuby\>allinoneruby tktest.rb  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102:in  
`initiali  
ze’: Can’t find a usable init.tcl in the following directories:  
(RuntimeError)  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/tcl8.4  
C:/DOKUME~1/wolfg  
ang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/tcl8.4  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/lib  
/tcl8.4  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/library  
C:/DOKUME~1/wolf  
gang/LOKALE~1/Temp/library  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/tcl8.4.13/library  
C:/DOKUME~  
1/wolfgang/LOKALE~1/tcl8.4.13/library

This probably means that Tcl wasn’t installed prop from  
C:/DOKUME~1/wolfgang/LOKALE~1  
/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102:in `new’  
from  
C:/DOKUME~1/wolfgang/LOKALE~1/Temp/eee.allinoneruby.exe.3/lib/lib4/tk.rb:1102

```
     from E:/AllInOneRuby/tktest.rb:1:in `require'
     from E:/AllInOneRuby/tktest.rb:1
     from

```

C:\DOKUME~1\wolfgang\LOKALE~1\Temp\eee.allinoneruby.exe.3\bootstrap.rb:50:in  
`load’  
from  
C:\DOKUME~1\wolfgang\LOKALE~1\Temp\eee.allinoneruby.exe.3\bootstrap.rb:50

> > > > > End of Console Protocol \>\>\>\>\>

On my Windows 2000 installation the error is the same when  
'allinoneruby.exe’was  
generated with ‘–site’. An other person has a different error message  
when  
using ‘–site’ with the contents, that ‘GetModuleHandleExA’ is not found  
in  
‘Kernel32.dll’

The programs work well when together with ‘RubyScript2Exe’, but on my  
environment (Windows 2000) it is always necessary to use  
‘–rubyscript2exe-tk’  
otherwise the same error will occur.

What happens there?

Wolfgang Nádasi-Donner (WoNáDo)

---

<div class="post-metadata">

**Author:** ![wonado](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wonado](https://www.ruby-forum.com/u/wonado)\
**Post date:** [January 22, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/problem-using-allinoneruby-with-tk-program-windows-2000-a/82971/2 "2007-01-22T22:50:52Z")

</div>

> the contents, that ‘GetModuleHandleExA’ is not found in  
> ‘Kernel32.dll’
> 
> The programs work well when together with ‘RubyScript2Exe’,  
> but on my environment (Windows 2000) it is always necessary  
> to use ‘–rubyscript2exe-tk’ otherwise the same error will  
> occur.
> 
> What happens there?

Plain RubyScript2Exe is only able to detect and embed the  
Ruby-TK bindings, not TK itself. By using the  
–rubyscript2exe-tk option, it’s forced to include TK itself as  
well. AllInOneRuby has no --tk option. Therefore, the resulting  
executable still depends on a manually installed version of TK.

In this case, --site is not relevant.

I’ll consider including a --tk option in AllInOneRuby. It’s  
probably just copy & paste from RubyScript2Exe… ;]

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)

---

<div class="post-metadata">

**Author:** ![wonado](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wonado](https://www.ruby-forum.com/u/wonado)\
**Post date:** [January 22, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/problem-using-allinoneruby-with-tk-program-windows-2000-a/82971/3 "2007-01-22T23:48:07Z")

</div>

Erik V. schrieb:

> I’ll consider including a --tk option in AllInOneRuby. It’s  
> probably just copy & paste from RubyScript2Exe… ;]

Thank you - I will copy this message to the german Ruby-Forum, where the  
problem  
occured.

Wolfgang Nádasi-Donner
