Cannot get Tk extension samples to work with Windows XP

Hello,

I cannot get any of Tk extension samples to work on Windows XP. I was able to run them successfully on Linux and Mac.

For example, here is the error that I get when I run ruby BWidget demos:

ruby demo.rb

c:/ruby/lib/ruby/1.8/tk/package.rb:86:in `require': TkPackage can't find package BWidget (RuntimeError)
from c:/ruby/lib/ruby/1.8/tkextlib/bwidget.rb:16
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
from demo.rb:3

Exit code: 1

* I have ruby 1.8.2-15 installed. The rest of ruby runs fine.
* I have ActiveTcl 8.4.9.0 installed and I can run the same BWidget (and other) demos as TclTk demos.

My guess is that I am missing some environment variable to connect the ruby bindings with the actual Tk extension libraries. I would appreciate if somebody would help with this.

Regards,

Goran

Message-ID: <20050515194634.10483.qmail@web81404.mail.yahoo.com>

I cannot get any of Tk extension samples to work on Windows XP. I was able to run them successfully on Linux and Mac.

    (snip)

My guess is that I am missing some environment variable to connect the ruby bindings with the actual Tk extension libraries. I would appreciate if somebody would help with this.

I don't know whether tcltklib included 1.8.2-15 supports libraries
of Tcl/Tk8.4 or not. Please check Tk::TK_VERSION value.
If the value is "8.3" and 1.8.2-15 doesn't support Tcl/Tk8.4,
please read [ruby-talk:120774].
If 1.8.2-15 supports Tcl/Tk8.4 and Ruby/Tk cannot find the
libarary path as you say, please entry the library path to
Tk::AUTO_PATH.
Probably, one of the easiest way is to add the following line
to the file "<ruby-lib>/tkextlib/setup.rb".

···

From: Goran Stankovic <goran2@swbell.net>
Subject: Cannot get Tk extension samples to work with Windows XP
Date: Mon, 16 May 2005 04:46:55 +0900
------------------------------------------------------
Tk::AUTO_PATH.list <<= "<your ActiveTcl top>/lib"
------------------------------------------------------
If you have the trouble on the specific Tk extension, please add
a similar line to "<ruby-lib>/tkextlib/<extention>/setup.rb".
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Hi,

I'd remove your previous tk/ruby installations.

Get and install
ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ruby-1.8.2-20050201-i386-mswin32.zip

Get and install
http://www.activestate.com/store/languages/register.plex?id=ActiveTcl

That should get you working. At least, it did for me.

···

On 5/15/05, Goran Stankovic <goran2@swbell.net> wrote:

Hello,

I cannot get any of Tk extension samples to work on Windows XP. I was able to run them successfully on Linux and Mac.