From: Rich Leblanc on
Rich Leblanc wrote:
> Roger Pack wrote:
>> Rich Leblanc wrote:
>>> Roger Pack wrote:
>>>>
>>>>> LoadError: no such file to load -- tk
>>>>
>>>> This means that your Ruby runtime, when you built it, was unable to find
>>>> your Tk libs/headers, so didn't build your Tk installation.
>>>>
>>>
>>> Yes I got that much. But I don't understand why. I followed that guide
>>> step by step but it didn't work.
>>
>> 1.9.1 didn't build the Tk extension all that well on windows. It should
>> be fixed with 1.9.2...or there may be some other bug since I only use
>> mingw not VC to compile it.
>>
>
> The tutorial says use 1.8.x not 1.9.x.
>
>
>> To reproduce it go into your ext/tk library and run extconf.rb (and
>> nmake I guess). It should fail.
>>
>
> Reproduce what? I don't understand.
>
>>>> Your only hope after that point is to somehow make them accessible (in
>>>> your case, by building Tcl/Tk using the same compiler you used to build
>>>> ruby, then installing tk_as_gem).
>>>
>>> My only hope? What about figuring out why it didn't work, fix the
>>> problem and try again?
>>
>> Please do.
>
>
> I'm trying. That's why I'm here. It seems that tk library is not in the
> right place when compiling. Is that it? Then where should it be so I can
> check and see if it's there?
>
>
>
>>
>>> The tutorial says do not use the installer. I'd like to get one thing
>>> working before moving on to something else I don't understand. I didn't
>>> find anything helpful in those links. If you'd like to link the specific
>>> page that points to the answer to my problem I'd be happy to read it.
>>
>> The tutorial contains instructions on how to build it from source...
>
> Uh, ya.
>
>>
>>>> Also ffi-tk might fit the bill.
>>
>> Do you have any response to this (it's a gem)?
>
> I don't know what that is or what a gem is. I'm a newb at the beginning
> trying to follow a tutorial. I know very little about ruby.
>
>
>>
>> Anyway, to make it easier I packaged up one for you.
>> I downloaded 1.9.1p429 from http://rubyinstaller.org/downloads/
>> then downloaded "◦Ruby/Tk environment" from from
>> http://www.ruby-forum.com/topic/210186#new
>> and unpackaged it to the appropriate directory.
>>
>> http://faithpromotingrumors.org/incoming/ruby-1.9.1-p429-i386-mingw32.7z
>>
>> GL.
>> -r
>
> don't know what any of that means.

Ok I've unzipped this thing now how do I install it? And what would I do
if you didn't make me this? I'd really like to get the original problem
fixed and figure out how to get the 1.8.x source compiled and working as
in that tutorial. I'd like to know how to get the proper files in the
right place and understand what I'm doing not "click one button and have
it magically work".

I don't want to start getting sidetracked. How can I build the 1.8.x
source properly with tk and avoid this error? That was my original
question. I also need to get this working on my Unix machine next (or in
parallel). As far as I know there is no "one-click installer" for that.
I need to know what goes where. Aren't there any install instructions
anywhere?

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

From: Hidetoshi NAGAI on
From: Rich Leblanc <rl001(a)pacbell.net>
Subject: Re: LoadError: no such file to load -- tk
Date: Wed, 21 Jul 2010 11:16:27 +0900
Message-ID: <4842dd6277bcb8f01e6d56fdc7123ef2(a)ruby-forum.com>
> This is getting more and more confusing. How do I check check
> consistency of architecture between Ruby and Tcl/Tk if it's 32 bit or
> 64? I thought 32 bit apps can run on a 64 bit machine. This tutorial is

# Because I'm not familiar with development on Windows, the following
# may be wrong.

On Ruby/Tk, Ruby links tcltklib.so and links dynamic link librariies
of Tcl/Tk. If Ruby's core is a 32bit binary and Tcl/Tk DLLs are 64bit
binaries, Ruby cannot link Tcl/Tk DLLs.
It's not about OS, but consistency between an executable and DLLs.

Which version of ActiveTcl did you download?
If its platform is "Windows (x86)", it is 32bit version of Tcl/Tk.
But if you download "Windows (64-bit, x64)", then 64bit.

How does "ruby.exe -v" describe?
If it includes "x86-mswin32", then it is a 32bit executable.
Else if includes "x64-mswin64", then a 64bit.

If your Tcl/Tk is 64bit and your compiler can make 64bit binaries,
please try "--target=x64-mswin64" configure option.
If your compiler can make 32bit binaries only, please download and
install a 32bit version of ActiveTcl.
--
Hidetoshi NAGAI (nagai(a)ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

From: Rich Leblanc on

Actually I would like to get this fixed on my Unix machine too. I'm
getting this same error. I have tcl8.5.8 installed and Ruby 1.8.7. How
can I get it to work on Unix? Maybe if I get that working I'll
understand what I'm supposed to do on Windows.
--
Posted via http://www.ruby-forum.com/.

From: Michael Fellinger on
On Wed, Jul 21, 2010 at 1:27 PM, Rich Leblanc <rl001(a)pacbell.net> wrote:
> Rich Leblanc wrote:
>> Roger Pack wrote:
>>> Rich Leblanc wrote:
>>>> Roger Pack wrote:
>>>>>
>>>>>> LoadError: no such file to load -- tk
>>>>>
>>>>> This means that your Ruby runtime, when you built it, was unable to find
>>>>> your Tk libs/headers, so didn't build your Tk installation.
>>>>>
>>>>
>>>> Yes I got that much. But I don't understand why. I followed that guide
>>>> step by step but it didn't work.
>>>
>>> 1.9.1 didn't build the Tk extension all that well on windows.  It should
>>> be fixed with 1.9.2...or there may be some other bug since I only use
>>> mingw not VC to compile it.
>>>
>>
>> The tutorial says use 1.8.x not 1.9.x.
>>
>>
>>> To reproduce it go into your ext/tk library and run extconf.rb (and
>>> nmake I guess).  It should fail.
>>>
>>
>> Reproduce what? I don't understand.
>>
>>>>> Your only hope after that point is to somehow make them accessible (in
>>>>> your case, by building Tcl/Tk using the same compiler you used to build
>>>>> ruby, then installing tk_as_gem).
>>>>
>>>> My only hope? What about figuring out why it didn't work, fix the
>>>> problem and try again?
>>>
>>> Please do.
>>
>>
>> I'm trying. That's why I'm here. It seems that tk library is not in the
>> right place when compiling. Is that it? Then where should it be so I can
>> check and see if it's there?
>>
>>
>>
>>>
>>>> The tutorial says do not use the installer. I'd like to get one thing
>>>> working before moving on to something else I don't understand. I didn't
>>>> find anything helpful in those links. If you'd like to link the specific
>>>> page that points to the answer to my problem I'd be happy to read it.
>>>
>>> The tutorial contains instructions on how to build it from source...
>>
>> Uh, ya.
>>
>>>
>>>>> Also ffi-tk might fit the bill.
>>>
>>> Do you have any response to this (it's a gem)?
>>
>> I don't know what that is or what a gem is. I'm a newb at the beginning
>> trying to follow a tutorial. I know very little about ruby.
>>
>>
>>>
>>> Anyway, to make it easier I packaged up one for you.
>>> I downloaded 1.9.1p429 from http://rubyinstaller.org/downloads/
>>> then downloaded "◦Ruby/Tk environment" from from
>>> http://www.ruby-forum.com/topic/210186#new
>>> and unpackaged it to the appropriate directory.
>>>
>>> http://faithpromotingrumors.org/incoming/ruby-1.9.1-p429-i386-mingw32.7z
>>>
>>> GL.
>>> -r
>>
>> don't know what any of that means.
>
> Ok I've unzipped this thing now how do I install it? And what would I do
> if you didn't make me this? I'd really like to get the original problem
> fixed and figure out how to get the 1.8.x source compiled and working as
> in that tutorial. I'd like to know how to get the proper files in the
> right place and understand what I'm doing not "click one button and have
> it magically work".
>
> I don't want to start getting sidetracked. How can I build the 1.8.x
> source properly with tk and avoid this error? That was my original
> question. I also need to get this working on my Unix machine next (or in
> parallel). As far as I know there is no "one-click installer" for that.
> I need to know what goes where. Aren't there any install instructions
> anywhere?

gem install ffi-tk

That should work on any platform, be it 64bit, 32bit, windows, linux,
MRI, or JRuby.

The issue is that all existing tutorials are written with ruby-tk in
mind, some of the API is different.

--
Michael Fellinger
CTO, The Rubyists, LLC

From: Hidetoshi NAGAI on
From: Rich Leblanc <rl001(a)pacbell.net>
Subject: Re: LoadError: no such file to load -- tk
Date: Wed, 21 Jul 2010 15:03:41 +0900
Message-ID: <58fb92a4ff1539ea5a3f5b64595f1bf7(a)ruby-forum.com>
> Actually I would like to get this fixed on my Unix machine too. I'm
> getting this same error. I have tcl8.5.8 installed and Ruby 1.8.7. How
> can I get it to work on Unix? Maybe if I get that working I'll

Please tell me the directories of your Tcl/Tk headers/libraries, and
configure options which you gave at first step of compiling.
Probably, ext/tk/extconf.rb outputs some messages about searching and
testing Tcl/Tk libraries (and {tcl,tk}Config.sh) during make steps.
Please tell me the messages, too.
--
Hidetoshi NAGAI (nagai(a)ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology