From: Eric Christopherson on
On Tue, Feb 16, 2010 at 8:14 PM, Albert Schlef <albertschlef(a)gmail.com> wrote:
> Eric Christopherson wrote:
>> On Tue, Feb 16, 2010 at 5:57 PM, Albert Schlef <albertschlef(a)gmail.com>
>> wrote:
>>> package and everything will work fine.
>> I did install ActiveTcl on Windows, but afterwards "require 'tk'"
>> didn't work. It seems that I don't even have the proper Ruby files to
>> "require". I also never told Ruby where my Tcl/Tk was installed.
>
> I [vaguely] remember having this problem. After I installed
> ActiveState's package ruby wasn't able to see Tk's DLL. I believe my
> problem had gone after I restarted Windows. Perhaps the folder the DLL
> is in is added to Windows' registry somewhere and Windows notes it only
> after a restart. I know very little about Windows so this is only a
> guess.

I just installed ActiveTcl, on my home machine this time, and I don't
see any Ruby-specific files in its directory hierarchy. After
rebooting, requiring 'tk' again yielded "LoadError: no such file to
load -- tk", so I think I may be out of luck.

From: Albert Schlef on
Eric Christopherson wrote:
> I just installed ActiveTcl, on my home machine this time, and I don't
> see any Ruby-specific files in its directory hierarchy. After
> rebooting, requiring 'tk' again yielded "LoadError: no such file to
> load -- tk", so I think I may be out of luck.

I've just switched to my Windows box and tried to install Ruby + Tk.

Like you, I've found out that Ruby (of RubyInstaller) doesn't come with
some ruby files necessary to talk with Tk. E.g., it should have a file
C:\Ruby\lib\ruby\1.8\tk.rb (and some more, including a DLL) but it
doesn't have them.

It seems like a change in recent RubyInstallers, because I remember
easily installing Ruby+Tk on Windows in the past.

I'll try to investigate this.

Hidetoshi NAGAI, are you there? Do you know anything about this?

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

From: Albert Schlef on
Albert Schlef wrote:
> Like you, I've found out that Ruby (of RubyInstaller) doesn't come with
> some ruby files necessary to talk with Tk.
[...]
> It seems like a change in recent RubyInstallers, because I remember
> easily installing Ruby+Tk on Windows in the past.

It seems I've solved the mystery: "RubyInstaller" doesn't come with Tk
bindings, but Ruby's "One-Click Installer" does. So in the past it was
the latter I was using, not the former.

I'll shut up for a while and let more knowledgeable people than me join
this discussion.
--
Posted via http://www.ruby-forum.com/.

From: Axel on

Hi,

don't know about MAC; that's what I know for Windows:

You need to have:

* TCL/TK installed (for example, from Active State)
* The _right_ compiled Ruby-TK-Files
* Your ENV-Variable "path" set to the right paths

The Ruby-TK-Files depend on:
* TK-Version (8.4, 8.5; 8.5 probably looks nicer)
* Ruby version
* Compiler, with which Ruby has been complied.

AFAIK, it is sufficient to get the right ruby-files from "somewhere"
and copy them to the
right dirs in the Ruby dir.

I think, Roger Pack recently provided at least two versions of Ruby-
files, but now I can find only one:
* http://github.com/rdp/tk_as_gem

Maybe, you can find links to more here:
* http://groups.google.com/group/rubyinstaller/topics

If you want to compile it yourself with mingw:
* comp.lang.ruby, 2009-12-18, "Ruby 1.8.7 + Tk8.5 with Windows-
RubyInstaller"

If you want to compile it with Microsoft compiler (IMHO, this has
disadvantages regarding other libraries!):
* www.tkdocs.com

Axel
From: Roger Pack on
> I'm not sure about MaxOSX, but for Windows:
>
> http://wiki.github.com/rdp/ruby_tutorials_core/tk
>
> The "Availability" section says you just have to install ActiveState's
> package and everything will work fine.

I've updated the windows section
http://wiki.github.com/rdp/ruby_tutorials_core/tk#windows
with a bit more verbosity on which version has it preinstalled.
-r
--
Posted via http://www.ruby-forum.com/.