# Ruby Tk?

**URL:** <https://www.ruby-forum.com/t/ruby-tk/122283>\
**Category:** Ruby\
**Created:** [December 6, 2007, 6:16am UTC](https://www.ruby-forum.com/t/ruby-tk/122283 "2007-12-06T06:16:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keersarge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@keersarge](https://www.ruby-forum.com/u/keersarge)\
**Post date:** [December 6, 2007, 6:16am UTC](https://www.ruby-forum.com/t/ruby-tk/122283/1 "2007-12-06T06:16:13Z")

</div>

I have started learning Ruby (on Debian Linux) and am at the point to  
get  
out of the books and enter the just try and see mode. I was trying to  
bring up a very small example program with the graphical TK toolkit.

I have Perl-tk on my machine and it works. All the Ruby examples have a  
‘require tk’ to bring in the toolkit, but when I run the very short  
examples I get the error message…

./test.rb:3:in `require’: no such file to load – tk (LoadError)  
from ./test.rb:3

I am sure that I need to point Ruby to TK with some environment variable  
or something like that since TK is buried in the Perl subdirectory and  
Ruby is not going to find it. (I am assuming that the TK toolkit I am  
trying to use is the same one as Perl uses, and not some special Ruby-tk  
or TK installed in the Ruby folders).

I am still playing with paths but there is nothing I can find in my  
documentation on how to connect TK to Ruby - at least not that I have  
found so far. Even installing a copy of TK in the Ruby subdirectory  
didn’t work.

Anybody?

Thanks  
Keersarge

---

<div class="post-metadata">

**Author:** ![keersarge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@keersarge](https://www.ruby-forum.com/u/keersarge)\
**Post date:** [December 6, 2007, 7:52am UTC](https://www.ruby-forum.com/t/ruby-tk/122283/2 "2007-12-06T07:52:43Z")

</div>

From: keersarge [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Ruby Tk?  
Date: Thu, 6 Dec 2007 14:15:39 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I have started learning Ruby (on Debian Linux) and am at the point to get  
> (snip)  
> ./test.rb:3:in `require’: no such file to load – tk (LoadError)  
> from ./test.rb:3

If you already installed Tcl/Tk (‘tcl’ and ‘tk’ package),  
you may not install ‘ruby-tcltk’ package.
