Problems getting Tk running

Hi,

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available.
I googled a bit and found that I have to install ActiveTcl 8.4 and did this.
Message still occurred, after I copied tk84.dll from Tcl/lib to ruby/lib the next error was "tcl84.dll" not found... I copied this, too, and then init.tcl was not found...
I think I'm on the wrong way to copy all the files from Tcl to ruby, how can I get Tk running?

Thanks for hints,
Jens

Is Tk an absolute necessity? There are certainly better UI libraries
for Ruby on Windows, including Shoes, GTK, and the various JRuby-based
Swing/SWT wrappers.

- Charlie

···

On Thu, Jun 11, 2009 at 5:00 AM, Jens Riedel<JensRie@gmx.de> wrote:

Hi,

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available.
I googled a bit and found that I have to install ActiveTcl 8.4 and did this.
Message still occurred, after I copied tk84.dll from Tcl/lib to ruby/lib the
next error was "tcl84.dll" not found... I copied this, too, and then
init.tcl was not found...
I think I'm on the wrong way to copy all the files from Tcl to ruby, how can
I get Tk running?

You have to install TK following these instructions:

http://www.tkdocs.com/tutorial/install.html

Once you install/unpack the binaries, you have to build ruby from source
in order for it to see that TK is installed and that you want to use it.
It's not included with the one-click installer.

···

--
Posted via http://www.ruby-forum.com/.

Message-ID: <79c2m4F1q0o90U1@mid.individual.net>

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available.
I googled a bit and found that I have to install ActiveTcl 8.4 and did this.

Please check your PATH evironment variable.
Does it include "<ActiveTcl install path>\bin" ?

···

From: Jens Riedel <JensRie@gmx.de>
Subject: Problems getting Tk running
Date: Thu, 11 Jun 2009 19:00:06 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Jens Riedel wrote:

Hi,

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available.
I googled a bit and found that I have to install ActiveTcl 8.4 and did
this.
Message still occurred, after I copied tk84.dll from Tcl/lib to ruby/lib
the next error was "tcl84.dll" not found... I copied this, too, and then
init.tcl was not found...
I think I'm on the wrong way to copy all the files from Tcl to ruby, how
can I get Tk running?

Thanks for hints,
Jens

Some said that Tk used to be included in the One-Click Installer. This
is apparently no longer the case. Unfortunately, that makes things much
more complicated when you want to send a program to a friend who's
runnning Windows.

···

--
Posted via http://www.ruby-forum.com/\.

That all depends on what you mean by better.
I have heard people say that before but when I investigated libraries
like FOX and Gtk they came up wanting. I have been using Tcl/Tk in Unix/
Linux for 16 years and found it extremely versatile. Like Jens, I have
been porting all my C/Tcl/Tk programs to Ruby/RubyTk. There are things I
need to do in Tk which the other libraries simply do not address. For
instance the Tk Canvas is a very capable widget - no other library can
generate a printable Postscript file from a canvas the way Tk does -
AFAIK. There are other areas where coding is simple and transparent in
Tk but difficult, verbose or downright impossible in other systems.
Having said that Tk does not fit in comfortably with the object hierarchy
(judging by what others have said) but in my relatively simple scripts
there have been no real problems.

Shoes does look to be a very good choice for lightweight graphic systems.

This is a bit off topic and I don't want to start a flame war.

Len

···

On Thu, 11 Jun 2009 18:17:19 -0500, Charles Oliver Nutter wrote:

On Thu, Jun 11, 2009 at 5:00 AM, Jens Riedel<JensRie@gmx.de> wrote:

Hi,

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available. I
googled a bit and found that I have to install ActiveTcl 8.4 and did
this. Message still occurred, after I copied tk84.dll from Tcl/lib to
ruby/lib the next error was "tcl84.dll" not found... I copied this,
too, and then init.tcl was not found...
I think I'm on the wrong way to copy all the files from Tcl to ruby,
how can I get Tk running?

Is Tk an absolute necessity? There are certainly better UI libraries for
Ruby on Windows, including Shoes, GTK, and the various JRuby-based
Swing/SWT wrappers.

- Charlie

Ftf 3k3 wrote:

Jens Riedel wrote:

Hi,

I use Ruby 1.8 under Windows (installed with the One-Click-Installer).
When I try to use Tk I get a message that tk84.dll is not available.
I googled a bit and found that I have to install ActiveTcl 8.4 and did
this.
Message still occurred, after I copied tk84.dll from Tcl/lib to ruby/lib
the next error was "tcl84.dll" not found... I copied this, too, and then
init.tcl was not found...
I think I'm on the wrong way to copy all the files from Tcl to ruby, how
can I get Tk running?

Thanks for hints,
Jens

Some said that Tk used to be included in the One-Click Installer. This
is apparently no longer the case. Unfortunately, that makes things much
more complicated when you want to send a program to a friend who's
runnning Windows.

There seem to be a few bugs with Tk in Ruby 1.8.6 - bugs where the same
Tk instructions work fine in both Tcl and Python.

Tk is generally so well suited to portable scripting that it is
worrisome to see it in neglect in Ruby. There are also a lot of serious
bugs in the Tk IDE for Ruby, Arcadia. And yet if you look at a rich IDE
built in Tk such as the XCTcl IDE you can see what can be achieved.

In the case of Python, Tk is usually half the lines of code compared to
Gtk+ and Ruby is about the same (although better than the Python Gtk kit
in that regard)

If you look at QTk for the Oz language you will see just how much can be
achieved in the way of a Dynamic GUI with just Tk.

That being said, I still use some FXRuby and tinker with Mondrian for
Ruby.

···

--
Posted via http://www.ruby-forum.com/\.

Some said that Tk used to be included in the One-Click Installer. This
is apparently no longer the case. Unfortunately, that makes things much
more complicated when you want to send a program to a friend who's
runnning Windows.

I've had success with the RC2 and I believe not even installing
activeTcl. Give it a shot :slight_smile:
-r

···

--
Posted via http://www.ruby-forum.com/\.

Tk is generally so well suited to portable scripting that it is
worrisome to see it in neglect in Ruby. There are also a lot of serious
bugs in the Tk IDE for Ruby, Arcadia. And yet if you look at a rich IDE
built in Tk such as the XCTcl IDE you can see what can be achieved.

We're working on getting those bugs squashed :slight_smile:
Feel free to help out if you'd like.
-r

···

--
Posted via http://www.ruby-forum.com/\.