From: Hidetoshi NAGAI Date: 2012-07-11T16:34:34+09:00 Subject: Re: how to create a CText Tk widget ? From: "Fred L." Subject: how to create a CText Tk widget ? Date: Tue, 10 Jul 2012 05:30:16 +0900 Message-ID: <094f1bdd58cd8b82f14ecdc227b7ea66@ruby-forum.com> > and here is the error I got : > > C:/Ruby193/lib/ruby/1.9.1/tk/package.rb:86:in `rescue in require': > TkPackage can't find package ctext (RuntimeError) > from C:/Ruby193/lib/ruby/1.9.1/tk/package.rb:83:in `require' > from C:/Ruby193/lib/ruby/1.9.1/tkextlib/tcllib/ctext.rb:14:in ` (required)>' > from > C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in > `require' > from > C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in > `require' > from tk_test7.rbw:2:in `
' > > forgot to mention, I'm on WindowsXP with the last version of > RubyInstaller (with Tk included) and devkit.. Probably, you don't have tcllib extension package for your Tcl/Tk libraries which used by Ruby/Tk. You'll be able to get the status list of extension packages by "ruby /tkextlib/pkg_checker.rb". (e.g."ruby C:/Ruby193/lib/ruby/1.9.1/tkextlib/pkg_checker.rb") One of the easy ways to get tcllib/tklib package is "download ActiveTcl-8.4 package". Extension packages included ActiveTcl-8.4 are available for 8.5. To add the packages to Ruby/Tk, please copy them to the library path of Ruby/Tk or add the path of packages to Tk::AUTO_PATH. For example, when the path of tcllib/tklib is "/opt/ActiveTcl-8.4/lib/{tcllib1.9,tklib0.4}", do "Tk::AUTO_PATH.list <<= '/opt/ActiveTcl-8.4/lib/tcllib1.9'; Tk::AUTO_PATH.list <<= '/opt/ActiveTcl-8.4/lib/tklib0.4'" or "Tk::AUTO_PATH.list <<= '/opt/ActiveTcl-8.4/lib". If you want to use the setting permanently, please add the setting to "/tkextlib/setup.rb" or "/tkextlib/tcllib/setup.rb". -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) Department of Artificial Intelligence, Kyushu Institute of Technology