# Comparison of ways to install Tk

**URL:** <https://www.ruby-forum.com/t/comparison-of-ways-to-install-tk/192113>\
**Category:** Ruby\
**Created:** [July 24, 2010, 12:23am UTC](https://www.ruby-forum.com/t/comparison-of-ways-to-install-tk/192113 "2010-07-24T00:23:45Z")\
**Posts on this page:** 3\
**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:** [July 24, 2010, 12:23am UTC](https://www.ruby-forum.com/t/comparison-of-ways-to-install-tk/192113/1 "2010-07-24T00:23:45Z")

</div>

In the recent discussion of installing Tk in a Windows Ruby  
installation, I learned of the existence of tk-win. I already knew  
about tk\_as\_gem and ffi-tk.

What are the advantages and disadvantages of each one?

Also, I’m unclear on which platforms they run on. I assume tk-win is  
only for Windows. How about the other two?

---

<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:** [July 24, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/comparison-of-ways-to-install-tk/192113/2 "2010-07-24T16:28:37Z")

</div>

Eric C. wrote:

> In the recent discussion of installing Tk in a Windows Ruby  
> installation, I learned of the existence of tk-win. I already knew  
> about tk\_as\_gem and ffi-tk.
> 
> What are the advantages and disadvantages of each one?
> 
> Also, I’m unclear on which platforms they run on. I assume tk-win is  
> only for Windows. How about the other two?

tk-win is “brand new” and is basically tk\_as\_gem for 1.9.x

Cheers!  
-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:** [July 24, 2010, 4:58pm UTC](https://www.ruby-forum.com/t/comparison-of-ways-to-install-tk/192113/3 "2010-07-24T16:58:10Z")

</div>

On Sat, Jul 24, 2010 at 7:12 AM, Eric C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In the recent discussion of installing Tk in a Windows Ruby  
> installation, I learned of the existence of tk-win. I already knew  
> about tk\_as\_gem and ffi-tk.
> 
> What are the advantages and disadvantages of each one?
> 
> Also, I’m unclear on which platforms they run on. I assume tk-win is  
> only for Windows. How about the other two?

FFI::Tk runs on linux and windows, also on osx with X11.  
All it needs is the tcl/tk .dll/.so/.dylib, and it has the most common  
paths setup already, and it doesn’t require compilation.  
It also depends on Ruby 1.9, both in syntax and encoding support, so  
MRI 1.9.1 is the platform supported best, followed by jruby --1.9.  
The API is a drop-in replacement for ruby-tk, because I think that  
ruby-tk is way too excessive with aliasing and convenience-methods.  
All FFI:Tk tries to give you is a 1:1 mapping of Ruby:Tk and some  
basic Tcl, so it should be easy to use.
