# Tk on Windows and Mac OS X 10.6

**URL:** <https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579>\
**Category:** Ruby\
**Created:** [February 16, 2010, 10:34pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579 "2010-02-16T22:34:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 16, 2010, 10:34pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/1 "2010-02-16T22:34:27Z")

</div>

Is it possible to install Ruby Tk bindings on Windows with  
RubyInstaller, and on Mac OS X 10.6, without recompiling Ruby? I’ve  
seen a few sites that explain how to recompile Ruby on each platform  
to use Tk, but so far it looks like that’s the only way.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 1:16am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/2 "2010-02-17T01:16:34Z")

</div>

On Tue, Feb 16, 2010 at 5:57 PM, Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> package and everything will work fine.  
> I did install ActiveTcl on Windows, but afterwards “require ‘tk’”  
> didn’t work. It seems that I don’t even have the proper Ruby files to  
> “require”. I also never told Ruby where my Tcl/Tk was installed.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 12:57am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/3 "2010-02-17T00:57:28Z")

</div>

Eric C. wrote:

> Is it possible to install Ruby Tk bindings on Windows with  
> RubyInstaller, and on Mac OS X 10.6, without recompiling Ruby?

I’m not sure about MaxOSX, but for Windows:

[http://wiki.github.com/rdp/ruby\_tutorials\_core/tk](http://wiki.github.com/rdp/ruby_tutorials_core/tk)

The “Availability” section says you just have to install ActiveState’s  
package and everything will work fine.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 3:18am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/4 "2010-02-17T03:18:05Z")

</div>

Albert S. wrote:

> Eric C. wrote:
> 
> > On Tue, Feb 16, 2010 at 5:57 PM, Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > wrote:
> > 
> > > package and everything will work fine.  
> > > I did install ActiveTcl on Windows, but afterwards “require ‘tk’”  
> > > didn’t work. It seems that I don’t even have the proper Ruby files to  
> > > “require”. I also never told Ruby where my Tcl/Tk was installed.
> 
> I vaginally remember having this problem.

Wow. I intended to write “vaguely”. I had some misspelling (“vagually”),  
so I just picked the first suggestion the speller gave me, it looked  
like what I wanted. My sight isn’t 6/6. Sorry 🙂

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 3:14am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/5 "2010-02-17T03:14:48Z")

</div>

Eric C. wrote:

> On Tue, Feb 16, 2010 at 5:57 PM, Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > package and everything will work fine.  
> > I did install ActiveTcl on Windows, but afterwards “require ‘tk’”  
> > didn’t work. It seems that I don’t even have the proper Ruby files to  
> > “require”. I also never told Ruby where my Tcl/Tk was installed.

I vaginally remember having this problem. After I installed  
ActiveState’s package ruby wasn’t able to see Tk’s DLL. I believe my  
problem had gone after I restarted Windows. Perhaps the folder the DLL  
is in is added to Windows’ registry somewhere and Windows notes it only  
after a restart. I know very little about Windows so this is only a  
guess.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 6:25am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/6 "2010-02-17T06:25:02Z")

</div>

On Tue, Feb 16, 2010 at 8:14 PM, Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> problem had gone after I restarted Windows. Perhaps the folder the DLL  
> is in is added to Windows’ registry somewhere and Windows notes it only  
> after a restart. I know very little about Windows so this is only a  
> guess.

I just installed ActiveTcl, on my home machine this time, and I don’t  
see any Ruby-specific files in its directory hierarchy. After  
rebooting, requiring ‘tk’ again yielded “LoadError: no such file to  
load – tk”, so I think I may be out of luck.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 7:14am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/7 "2010-02-17T07:14:26Z")

</div>

Eric C. wrote:

> I just installed ActiveTcl, on my home machine this time, and I don’t  
> see any Ruby-specific files in its directory hierarchy. After  
> rebooting, requiring ‘tk’ again yielded “LoadError: no such file to  
> load – tk”, so I think I may be out of luck.

I’ve just switched to my Windows box and tried to install Ruby + Tk.

Like you, I’ve found out that Ruby (of RubyInstaller) doesn’t come with  
some ruby files necessary to talk with Tk. E.g., it should have a file  
C:\Ruby\lib\ruby\1.8\tk.rb (and some more, including a DLL) but it  
doesn’t have them.

It seems like a change in recent RubyInstallers, because I remember  
easily installing Ruby+Tk on Windows in the past.

I’ll try to investigate this.

Hidetoshi NAGAI, are you there? Do you know anything about this?

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 7:30am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/8 "2010-02-17T07:30:00Z")

</div>

Albert S. wrote:

> Like you, I’ve found out that Ruby (of RubyInstaller) doesn’t come with  
> some ruby files necessary to talk with Tk.  
> […]  
> It seems like a change in recent RubyInstallers, because I remember  
> easily installing Ruby+Tk on Windows in the past.

It seems I’ve solved the mystery: “RubyInstaller” doesn’t come with Tk  
bindings, but Ruby’s “One-Click Installer” does. So in the past it was  
the latter I was using, not the former.

I’ll shut up for a while and let more knowledgeable people than me join  
this discussion.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 9:42am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/9 "2010-02-17T09:42:13Z")

</div>

Hi,

don’t know about MAC; that’s what I know for Windows:

You need to have:

- TCL/TK installed (for example, from Active State)
- The _right_ compiled Ruby-TK-Files
- Your ENV-Variable “path” set to the right paths

The Ruby-TK-Files depend on:

- TK-Version (8.4, 8.5; 8.5 probably looks nicer)
- Ruby version
- Compiler, with which Ruby has been complied.

AFAIK, it is sufficient to get the right ruby-files from “somewhere”  
and copy them to the  
right dirs in the Ruby dir.

I think, Roger P. recently provided at least two versions of Ruby-  
files, but now I can find only one:

- [GitHub - rdp/tk\_as\_gem: the tk extension extracted from core and gem-ified](http://github.com/rdp/tk_as_gem)

Maybe, you can find links to more here:

- [http://groups.google.com/group/rubyinstaller/topics](http://groups.google.com/group/rubyinstaller/topics)

If you want to compile it yourself with mingw:

- comp.lang.ruby, 2009-12-18, “Ruby 1.8.7 + Tk8.5 with Windows-  
RubyInstaller”

If you want to compile it with Microsoft compiler (IMHO, this has  
disadvantages regarding other libraries!):

- [www.tkdocs.com](http://www.tkdocs.com)

Axel

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/10 "2010-02-17T17:20:41Z")

</div>

On 16 fév, 22:33, Eric C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Is it possible to install RubyTkbindings on Windows with  
> RubyInstaller, and on Mac OS X 10.6, without recompiling Ruby? I’ve  
> seen a few sites that explain how to recompile Ruby on each platform  
> to useTk, but so far it looks like that’s the only way.

There is a project which could make use of Tk with ruby much easier :  
[GitHub - manveru/ffi-tk: FFI bindings to the Tk GUI toolkit · GitHub](http://github.com/manveru/ffi-tk)  
It use ffi, so there is no specific binding to compile. You just need  
to have the tcl/tk lib available.

gem install ffi-tk

I’m not sure if this project is already usable, but it could be  
**the**  
solution for using Tk with Ruby?  
It would be great if ffi-tk was afficialy supported by the ruby core.

– Maurice

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 17, 2010, 2:17pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/11 "2010-02-17T14:17:04Z")

</div>

> I’m not sure about MaxOSX, but for Windows:
> 
> [http://wiki.github.com/rdp/ruby\_tutorials\_core/tk](http://wiki.github.com/rdp/ruby_tutorials_core/tk)
> 
> The “Availability” section says you just have to install ActiveState’s  
> package and everything will work fine.

I’ve updated the windows section  
[http://wiki.github.com/rdp/ruby\_tutorials\_core/tk#windows](http://wiki.github.com/rdp/ruby_tutorials_core/tk#windows)  
with a bit more verbosity on which version has it preinstalled.  
-r

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 18, 2010, 12:55am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/12 "2010-02-18T00:55:29Z")

</div>

From: Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: Tk on Windows and Mac OS X 10.6  
Date: Wed, 17 Feb 2010 15:14:28 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> It seems like a change in recent RubyInstallers, because I remember  
> easily installing Ruby+Tk on Windows in the past.
> 
> I’ll try to investigate this.
> 
> Hidetoshi NAGAI, are you there? Do you know anything about this?

I don’t know about recent RubyInstallers.

# A kind of troubles on OneClickRuby with ActiveTcl depends on

# the ‘Path’ environment variable which doesn’t include bin (dll)

# folder of ActiveTcl.

I heard tcltklib doesn’t work on MacRuby.  
But I have no Mac box, and I don’t know what kinds of trouble exist  
on compiling or running on MacRuby.  
So, at present, I cannot develop Ruby/Tk (tcltklib) on MacRuby.

For MacRuby (and JRuby), tk-ffi may be a kind of solutions.  
I’ve thought about using FFI in the past.  
And then, I didn’t have good idea to treat properly (without C  
functions) exceptions on callbacks without break Tcl’s event queue.

BTW,  
I know that there are many problems to install or distribute Ruby/Tk.  
I have a plan to create tcltklib.so includeing a Tcl/Tk environment.  
When using such kind of tcltklib.so, Ruby/Tk never load the Tcl/Tk  
libraries on the local environment (it means, no need installed Tcl/Tk).  
Although it may be a kind of advantage for some people, it loses the  
function about easy update of Tcl/Tk libraries (includes using Tcl/Tk  
extensions which are installed to local Tcl/Tk environment without  
re-create tcltklib.so) working with Ruby/Tk.  
Of course, we can make each version of tcltklib.so.

It is based on the idea of Tclkit (Starkit).  
If I can, I may try also to write a VFS-like library accessing  
directly Tcl’s Mk4VFS from Ruby.  
The library is used to create a monolitic executable file of Ruby/Tk  
application on Windows and Linux (and so on?).  
I know that it is a kind of “reinvention of the wheel”.  
However, I think, it’s worth treating Ruby and Tcl/Tk files on one VFS.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 18, 2010, 3:25pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/13 "2010-02-18T15:25:11Z")

</div>

From: Axel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: Tk on Windows and Mac OS X 10.6  
Date: Thu, 18 Feb 2010 21:30:16 +0900  
Message-ID:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> In advance, I was unhappy to need to install TCL (~ 23 MB), but  
> that was the only drawback. Installing ActiveTCL was without problems,  
> and as far as I understand, the licence is very permissive, even for  
> commercial use. And I was glad to _easily_ be able to install  
> additional TCL-libraries via “teacup”, for example “plotchart”, which  
> enables me to easily plot simple graphs from within Ruby without  
> having to deal with gnuplot.

On your environment only or machines under your control, it’s no  
problem.  
As you say (me too), it is the best way to use Ruby (and Ruby/Tk).  
However, if you must run your application on other environment  
without proper version of Tcl/Tk, you may have some troubles.  
I think that a monolithic tcltklib.so library is one of the solutions  
to avoid such kind of troubles.  
It doesn’t replace current binary style of tcltklib.so on Ruby/Tk.  
It is a new(?) binary style of tcltklib.so, which merges a Tcl/Tk  
environment as a virtual file system.  
When you load it on Ruby, you can use Ruby/Tk without installing Tcl/Tk.  
It need not write files to the local disk excluding temporal DLL files  
to load.

Probably, the tool will contain a base tcltklib.so library,  
a work environment (a file tree), and commands for packing/unpacking.

# Maybe, I merge some codes to Ruby/Tk to support such feature.

When you want to use additional Tcl/Tk libraries,  
you need copy the libraries to the work environment and pack it to  
the “tcltklib.so” file.  
To copy the libraries, you maybe able to use TEAcup.  
And probably, you’ll be able to test your application working with  
the monolitic tcltklib.so by running it on the work environment.

# If it is available to pack Ruby binary and environment by similar

# way, we can get a single executable file include all environment.

> And, from the licences, would it be allowed to freely distibute these  
> binaries?

Hmm…, I’ve not thought about the licenses.  
Probably, it will depend on Tcl/Tk, Metakit, tclvfs, Tclkit (Starkit),  
libraries packed with, and so on.

# I’m sorry, if my poor english cannot explain exactly.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 18, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/14 "2010-02-18T16:13:12Z")

</div>

> On your environment only or machines under your control, it’s no problem.  
> As you say (me too), it is the best way to use Ruby (and Ruby/Tk).  
> However, if you must run your application on other environment  
> without proper version of Tcl/Tk, you may have some troubles.

That’s true. Would OCRA solve this problem?

> I think that a monolithic tcltklib.so library is one of the solutions  
> to avoid such kind of troubles.  
> …
> 
> # way, we can get a single executable file include all environment.

Sounds to me like a very good solution; but sounds like very difficult  
and time-consuming, too.

> > And, from the licences, would it be allowed to freely distibute these  
> > binaries?

I meant, for example, I’ve compiled Ruby/Tk with mingw, for a certain  
version of Ruby and TK; would it be allowed to give these files to  
everybody by download? Or, do you know, are there licence issues which  
don’t allow or restrict this?

Axel

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 18, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/15 "2010-02-18T23:57:27Z")

</div>

From: Axel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: Tk on Windows and Mac OS X 10.6  
Date: Fri, 19 Feb 2010 00:12:08 +0900  
Message-ID:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> That’s true. Would OCRA solve this problem?

Maybe. My plan is not only one. It’s one of the solutions.

> > I think that a monolithic tcltklib.so library is one of the solutions  
> > to avoid such kind of troubles.  
> > …
> > 
> > # way, we can get a single executable file include all environment.
> 
> Sounds to me like a very good solution; but sounds like very difficult  
> and time-consuming, too.

Probably, not easy. But it will not so difficult as you think.  
By using Tclkit and some experiments, I’ve already succeeded to make  
a tcltklib.so merged a Tcl/Tk environment and create a TclTkIp object  
with Tk (of course, the version of Tcl/Tk is the one of the merged) on  
Ruby with the tcltklib.so.

> > > And, from the licences, would it be allowed to freely distibute these  
> > > binaries?  
> > > I meant, for example, I’ve compiled Ruby/Tk with mingw, for a certain  
> > > version of Ruby and TK; would it be allowed to give these files to  
> > > everybody by download? Or, do you know, are there licence issues which  
> > > don’t allow or restrict this?

Although I’m not well informed about licences, I think that you can  
distribute the package or binary with the same restrict as the Tcl/Tk  
package or binary created by Tclkit or Starkit.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 18, 2010, 1:31pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/16 "2010-02-18T13:31:02Z")

</div>

> I know that there are many problems to install or distribute Ruby/Tk.  
> I have a plan to create tcltklib.so includeing a Tcl/Tk environment.  
> When using such kind of tcltklib.so, Ruby/Tk never load the Tcl/Tk  
> libraries on the local environment (it means, no need installed Tcl/Tk).  
> Although it may be a kind of advantage for some people, it loses the  
> function about easy update of Tcl/Tk libraries (includes using Tcl/Tk  
> extensions which are installed to local Tcl/Tk environment without  
> re-create tcltklib.so) working with Ruby/Tk.

In advance, I was unhappy to need to install TCL (~ 23 MB), but  
that was the only drawback. Installing ActiveTCL was without problems,  
and as far as I understand, the licence is very permissive, even for  
commercial use. And I was glad to _easily_ be able to install  
additional TCL-libraries via “teacup”, for example “plotchart”, which  
enables me to easily plot simple graphs from within Ruby without  
having to deal with gnuplot.

For MRI-Ruby (mingw) despite installing ActiveTCL, I think, you  
need only to copy precompiled Ruby/TK-binaries into the right dirs and  
set the PATH-variable to the right paths. You need not to compile it  
yourself. Can anybody confirm this?

And, from the licences, would it be allowed to freely distibute these  
binaries?

If all this is right, I think, it could be easy to install Ruby/TK on  
Windows-MRI-mingw-Ruby; IMHO, there are only few things needed:

- A site for uploading and downloading precompiled binaries of Ruby/TK  
(or gem?)  
(Again, from the licences, would it be allowed to freely distibute  
these binaries?)
- A clear statement which binary is for which Ruby-version and  
TCL/TK-version (important).
- A clear description of how the install the downloaded  
Ruby/TK-binaries “copy files to xyz” (installer? gem? Roger P. did  
something like this…)
- A statement that it is a drawback that you have to install  
AcitveState, but that it is the _only_ drawback and that it takes  
~23 MB, that it’s easy to install, that the licence is permissive  
even for professional use (true?) and that it has the advantage of  
enabling you to install additional packages, for example for  
plotting
- A short description of how to install additional TCL/TK packages  
using “teacup”
- A clear description on how to set the PATH-variable (or do it with  
an installer script?)

If my assumptions are right, I think with the above list it would be  
easy to install Ruby/TK on Windows-mingw-MRI-Ruby.

Axel

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 19, 2010, 8:20am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/17 "2010-02-19T08:20:46Z")

</div>

> Probably, not easy. But it will not so difficult as you think.  
> By using Tclkit and some experiments, I’ve already succeeded to make  
> a tcltklib.so merged a Tcl/Tk environment and create a TclTkIp object  
> with Tk (of course, the version of Tcl/Tk is the one of the merged) on  
> Ruby with the tcltklib.so.

Great!

Thank you for your efforts!

Axel

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 19, 2010, 10:50am UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/18 "2010-02-19T10:50:37Z")

</div>

On Feb 18, 11:56 pm, Hidetoshi NAGAI [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > I think that a monolithic tcltklib.so library is one of the solutions  
> > > to avoid such kind of troubles.  
> > > …
> 
> Probably, not easy. But it will not so difficult as you think.  
> By using Tclkit and some experiments, I’ve already succeeded to make  
> a tcltklib.so merged a Tcl/Tk environment and create a TclTkIp object  
> with Tk (of course, the version of Tcl/Tk is the one of the merged) on  
> Ruby with the tcltklib.so.

Great, if it is possible, it would be _the_ definitive solution for Tk  
with Ruby.

If you have a recipe on how to build this full Ruby/Tk distrib from  
sources, I could test it on Macosx and some linux.  
These source would be :

- ruby-1.9xxx
- tcltk-8.5xxx or tcltk-8.6xxx

My idea would be to create a stand alone ruby sumo distrib (rubylab ?)  
with Ruby + Tk + Qt + FFI + some science selected extensions.  
(This would be the last alternative before switching from Ruby to  
Pihton ☹ )

But as I’m not very clever in compilation, this will take some  
time…

Cordialement,  
– Maurice

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 19, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/19 "2010-02-19T15:30:29Z")

</div>

On 19 Feb., 10:48, mdiam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Ruby with the tcltklib.so.  
> > My idea would be to create a stand alone ruby sumo distrib (rubylab ?)  
> > with Ruby + Tk + Qt + FFI + some science selected extensions.  
> > (This would be the last alternative before switching from Ruby to  
> > Pihton ☹ )
> 
> But as I’m not very clever in compilation, this will take some  
> time…
> 
> Cordialement,  
> – Maurice

Didn’t read everything. Just want to mention that there will be a Qt-  
Ruby-Gem for Windows release very soon. For Linux there should be pre-  
build packages available for most common distributions.

First adress for ruby + Qt/KDE: [The Kde-bindings Archives](http://lists.kde.org/?l=kde-bindings)

Robert

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [February 19, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579/20 "2010-02-19T18:13:34Z")

</div>

> If you have a recipe on how to build this full Ruby/Tk distrib from  
> sources, I could test it on Macosx and some linux.  
> These source would be :
> 
> - ruby-1.9xxx
> - tcltk-8.5xxx or tcltk-8.6xxx
> 
> My idea would be to create a stand alone ruby sumo distrib (rubylab ?)  
> with Ruby + Tk + Qt + FFI + some science selected extensions.  
> (This would be the last alternative before switching from Ruby to  
> Pihton ☹ )

The only real cross platform distro I’m aware of is “rawr” for jruby.  
If all you need is swing or the eclipse swt you’re good to go (there’s  
examples of ruby wrapping the swt in the redcar project).  
-r

[Next page](https://www.ruby-forum.com/t/tk-on-windows-and-mac-os-x-10-6/183579.md?page=2)
