From: Hidetoshi NAGAI Date: 2005-06-20T00:14:36+09:00 Subject: Re: How to make a browser in Ruby Tk From: sujeet kumar Subject: Re: How to make a browser in Ruby Tk Date: Sun, 19 Jun 2005 14:42:09 +0900 Message-ID: <734fb924050618224250c7f7f9@mail.gmail.com> > I am new to ruby. How to install the extension onTcl/Tk > environment and use the Tcl/Tk's library on Ruby/Tk ? My OS is fc3 > and I installed everything of the option on fc3 cd. My ruby version is > "ruby 1.8.2 (2004-12-25) [i686-linux]". I tried to install from > http://www.hwaci.com/sw/tkhtml/index.html link but it doesn't work. I don't know existence of RPM pakage of tkHTML extension for FC3. If you have development packages of Tcl/Tk and want install tkHTML from source files, you'll be able to find the compile steps in COMPILE.txt included in the tkHTML source archive. If you don't mind to use RPM packages, maybe to use the ActiveTcl binary package is one of the easiest way to make some extensions available on your Ruby/Tk. Then, * get an ActiveTcl binary package. (e.g. ActiveTcl8.4.10.0.147113-linux-ix86.tar.gz) * extract the package. (e.g. tar xvzf ActiveTcl8.4.10.0.147113-linux-ix86.tar.gz) * cd to the extracted directory and run ./install.sh. (e.g. cd ActiveTcl8.4.10.0.147113-linux-ix86; sh ./install.sh). Assume that ActiveTcl is installed at /usr/local/ActiveTcl. * Please read 'ext/tcltklib/README.ActiveTcl'(Ruby-1.8) 'ext/tk/README.ActiveTcl'(Ruby-1.9) . * add ActiveTcl's library directory to your library path. * extract Ruby source archive and cd to the generated directory. * run ./configure with options which indicates ActiveTcl libraries. (e.g. ./configure --with-tcl-dir=/usr/local/ActiveTcl/ \ --with-tk-dir=/usr/local/ActiveTcl/ \ --with-tcllib=tclstub8.4 \ --with-tklib=tkstub8.4 \ --enable-tcltk-stubs ) * make & make install > What packages do i need for installing the extension? I don't know > about Tcl . How to check it is properly installed? On Tcl/Tk, if succeed "package require ", probably the package is properly installed. If you want to check whether an extension is ready to use on Ruby/Tk, please run "/tkextlib/pkg_checker.rb". It possibly help you to know what kind of extensions are available on your Ruby/Tk. When an extension is available on Tcl/Tk but not available on Ruby/Tk, possibly, the reason of the difference is that (1) Ruby/Tk use different Tcl/Tk libraries from tested Tcl/Tk, or (2) Ruby/Tk don't know the library path of the extension. If (1), maybe remove old(?) library and recompile "tcltklib.so". If (2), maybe you have to add initialize steps (e.g. add library path of the extension to AUTO_PATH) to "setup.rb" on the Ruby/Tk's wrapper library directory for the extension. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)