From ncurse to Ruby


#1

Hi,

Currently I have a console based application on Linux. I want to move to
a Text based Menu UI using ncurses. But I came to know that Ruby would
be more easy to develop and flexible and powerful. Can any one comment
on this aspect to guide me in making a correct choice?

I downloaded the Ruby source ruby-1.8.6. I compiled the source and
installed. But the GUI tool kit TK is not binding and throwing an error
on executing an .rb file, like
“HelloWorld.rb:1:in `require’: no such file to load – tk (LoadError)”

Could anyone help me out?


#2

Seshu Vaddi wrote:

I downloaded the Ruby source ruby-1.8.6. I compiled the source and
installed. But the GUI tool kit TK is not binding and throwing an error
on executing an .rb file, like
“HelloWorld.rb:1:in `require’: no such file to load – tk (LoadError)”

Don’t compile Ruby. There’s some system to add tk support when you
compile; don’t bother. Just install Ruby and a matching RubyTk library
from your distro.

On my Ubuntu, I search up the correct package like this:

apt-cache search ruby | grep -i tk

then install it like this:

sudo apt-get install libtk-ruby

Uninstall whatever you did, first, then use your platform’s package
manager to install a complete set of integrated packages.


#3

Thank you very much Phlip.

I gone thru your reply. But I am using RedHat.

I compiled the tcl8.4.15-src.tar.gz and tk8.4.15-src.tar.gz.
But Ruby I compiled independently. Is there any way whick binds the Tk
library with Ruby with all being compiled independently.

Regards
Seshu.