From: Hidetoshi NAGAI Date: 2013-06-07T04:31:48+09:00 Subject: Re: RubyTk - tkimg fails to import? Hi, From: Ryan Braun Subject: Re: RubyTk - tkimg fails to import? Date: Fri, 7 Jun 2013 03:32:31 +0900 Message-ID: <90daa6fb6f7d1b3f347b46506ddb23df@ruby-forum.com> > And yes, I used the WindowsRubyInstaller that came with Tk bindings. > However, it says it's using version 8.5.12 In this case, it is not important. Please see "c:\Ruby193\lib\tcltk" folder. Probably, you can find Tcl/Tk libraries which installed by RubyInstaller. Those are pure Tcl/Tk. Ruby/Tk links the Tcl/Tk interpreter. To use a Tcl/Tk extension library, the Tcl/Tk interpreter must be able to load the extension. For example, "tkextlib/tkimg.rb" is a wrapper to control "Img" extention. So, to use it, the Tcl/Tk interpreter linked to Ruby must be able to load the extension. The Tcl/Tk interpreter installed by RubyInstaller checks "c:\Ruby193\lib\tcltk" folder as a library search path. Then, you must put Tcl/Tk extension libraries, which you want use on Ruby/Tk, under the folder. Please see "c:\Ruby193\lib\tcltk" folder, again. You'll be able to find core (standard) tcl and tk libraries, and standard extensions (DDE and register access) for Windows. And you will not be able to find Img extention. > I've installed ActiveTcL-8.5 but it doesn't not do anything. If you find Img extension ("Img1.x" folder) at "c:\Tcl\lib", please copy it to "c:\Ruby193\lib\tcltk". Unfortunately, if you don't have "Img1.x", please get it from ActiveTcl-8.4. The extension libraries included in ActiveTcl-8.4 (not included ActiveTcl-8.5) are comaptible with ActiveTcl-8.5. # If you want to use other extionsions, you can add them by same way. Or, remove tcl85.dll and tk85.dll from "c:\Ruby193\bin". Then, your ruby will use the Tcl/Tk libraries on ActiveTcl. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) Department of Artificial Intelligence, Kyushu Institute of Technology