Ok, this is what I did before I landed onto a terminal with a bunch of error messages...
First, I installed ruby1.9.1 using apt-get. (All of those ruby1.9.1 packages including ruby1.9.1-examples and ruby1.9.1-full).
Then, I installed tcl8.5 and tk8.5 including their dev packages similarly.
Then, I installed libtcltk-ruby1.9.1
As expected, ruby --version says that I have got
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
But in irb, when I require 'tk' it says:
RuntimeError: tcltklib: fail to Tk_Init(). Can't find a usable tk.tcl in the following directories: /usr/share/tcltk/tcl8.5/tk8.5 /usr/lib/tk8.5 /usr/local/lib/tcltk/tk8.5 /usr/local/share/tcltk/tk8.5 /usr/lib/tcltk/tk8.5 /usr/share/tcltk/tk8.5 /lib/tk8.5 /usr/library /usr/share/tcltk/tk8.5/tk.tcl: version conflict for package "Tk": have 8.5.10, need exactly 8.5.11 version conflict for package "Tk": have 8.5.10, need exactly 8.5.11 while executing "package require -exact Tk 8.5.11" (file "/usr/share/tcltk/tk8.5/tk.tcl" line 18) invoked from within "source /usr/share/tcltk/tk8.5/tk.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $file]" This probably means that tk wasn't installed properly. from /usr/lib/ruby/1.9.1/tk.rb:31:in `initialize' from /usr/lib/ruby/1.9.1/tk.rb:31:in `initialize' from /usr/lib/ruby/1.9.1/tk.rb:1245:in `new' from /usr/lib/ruby/1.9.1/tk.rb:1245:in `block in <module:TkCore>'
Similar procedure worked when I used ruby1.8 and same version of tcl and tk, but this doesn't seem to work. I think it has something to do with these packages and their dependencies.
So, finally my question is: How to install tk and ruby, if I want to program Tk GUI in ruby1.9?