DEV Community


Installing Ruby/Tk on Ubuntu

kojix2 profile image kojix2 ・1 min read

Ruby/Tk is an old Gem.
But it still works well.

You need some option to install Ruby/Tk on Ubuntu.

Install dependencies.(There are various other packages in Tk, so you can install them as needed. tcllib libtk-img-dev tkpng and so on.)

sudo apt install tk-dev

Install Ruby/Tk gem.

gem install tk -- --with-tcltkversion=8.6 \
--with-tcl-lib=/usr/lib/x86_64-linux-gnu \
--with-tk-lib=/usr/lib/x86_64-linux-gnu \
--with-tcl-include=/usr/include/tcl8.6 \
--with-tk-include=/usr/include/tcl8.6 \

If you install a new tk package, you might need to reinstall Ruby/Tk as well.

Have a nice day.

Discussion (0)

Editor guide