From: sujeet kumar Date: 2005-06-20T03:40:43+09:00 Subject: Re: How to make a browser in Ruby Tk Hi I installed ActiveTcl8.5.0.0b3.121397-linux-ix86.tar.gz in /usr/local/ActiveTcl. Now how to " add ActiveTcl's library directory to your library path" I tried to use [bash]$ D_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH \ ruby your-Ruby/Tk-script it gives "ruby: No such file or directory -- your-Ruby/Tk-script (LoadError)" how can i find the path of "ruby your-Ruby/Tk-script"? Is it "/home/sujeet/Soft/ruby-1.8.2/ext/tk" or it is in /usr directory or else. [bash]$ _LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH irb gives "irb(main):001:0> " what to do next? or how to use TCLLIBPATH ? 'Tk::AUTO_PATH.value' or 'Tk::AUTO_PATH.list' gives bash: Tk::AUTO_PATH.value: command not found bash: Tk::AUTO_PATH.list: command not found After this in ./configure --with-tcl-dir=/usr/local/ActiveTcl/ \ > --with-tk-dir=/usr/local/ActiveTcl/ \ > --with-tcllib=tclstub8.4 \ > --with-tklib=tkstub8.4 \ > --enable-tcltk-stubs ) step what is tclstub8.4 ? should i replace it with tclstub8.5 as my package is ActiveTcl8.5.0.0b3.121397-linux-ix86.tar.gz. Rest steps are clear. This will be a great help for me . Thanks sujeet On 6/19/05, Hidetoshi NAGAI wrote: > 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) > >