Can't seem to get tk to work (Ubuntu based OS)

Hi there!

I’ve been messing about with Ruby off and on for several months now. Largely by reading through a second hand copy of Fitzgerald’s “Learning Ruby” (gotta start somewhere, eh?). Well, I could not install it with $ sudo apt-get install libtcltk-ruby in the terminal.

So, I tried using Synaptic. That sort of worked. It installed these packages: tc, tclsh, tclsh8.6, and tcpdump. However, when I tried accessing tk with require ‘tk’ it didn’t work.

If someone could give a nudge in the right direction to make tk work on my system, that would be very nice indeed.

As the topic says, I’m using an Ubuntu-based OS. In this case Peppermint 9.

Thanks in advance!

I had bad experiences with TK while learning Ruby early on and decided to write my own GUI library the Ruby way instead: Glimmer

Check it out! It’s got a lightweight declarative GUI DSL, bidirectional data-binding, scaffolding, and native-executable packaging support.

The latest TK library version actually copied my declarative style DSL, albeit not perfectly. I still like Glimmer much better, and since it relies on JRuby, it solves the platform configuration problem you are dealing with effortlessly by relying on Java (Java solved that problem decades ago), which never needs recompilation of Ruby or any of that nonsense. It’s the perfect solution for native cross-platform support as offered in Glimmer’s SWT core GUI library.

1 Like