Ubuntu and Ruyb/Tk

In Ubuntu, the old Tk 8.4 is still considered the default Tk. So Ruby/Tk is compiled against it. And so we have ugly fonts. For those preferring to stick with the official packages, here's how to compile Ruby/Tk against the newer Tk 8.5.

(The instructions assume you're using Ruby 1.8. If you're using Ruby 1.9.1, replace all red occurrences of "1.8" with "1.9.1".)

sudo apt-get install tcl8.5-dev tk8.5-dev

mkdir tmp

cd tmp

apt-get source libruby1.8

cd ruby1.8-1.8*/ext/tk

CONFIGURE_ARGS='--with-tcl-include=/usr/include/tcl8.5/ --with-tcllib=tcl8.5 --with-tklib=tk8.5' ruby1.8 extconf.rb


sudo mv /usr/lib/ruby/1.8/i486-linux/tcltklib.so /usr/lib/ruby/1.8/i486-linux/tcltklib.so.orig

sudo cp tcltklib.so /usr/lib/ruby/1.8/i486-linux/

cd ..

rm -rf tmp

Please let me know of any problems with the instructions.