From: Rich Leblanc on
Rich Leblanc wrote:
> Eric Christopherson wrote:
>> On Mon, Jul 19, 2010 at 3:26 PM, Rich Leblanc <rl001(a)pacbell.net> wrote:
>>> Roger Pack wrote:
>>>> This means your ruby was built without the tk extension built.
>>>>
>>>> Useful refs:
>>>> http://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules/Tk
>>>> http://wiki.github.com/rdp/ruby_tutorials_core/tk (availability).
>>>> Cheers.
>>>> -r
>>>
>>> Yes I know, but why not? Neither of those links was helpful.
>>
>> How did you install Ruby? Using RubyInstaller? That doesn't include Tk
>> (because, as I understand it, it's currently impossible to
>> automatically build and package Tk along with it).
>>
>> Assuming you installed Tk, you can compile a gem called tk_as_gem that
>> will work with your existing Tk installation. You'll need the Ruby
>> development kit (MSys tools, available from http://rubyinstaller.org/)
>> to compile it.
>
> Like the first post says;
>
> I'm trying to install Ruby on a 64 bit Windows 7 machine following this
> guide;
>
> http://www.tkdocs.com/tutorial/install.html#installwin
>
>
> I installed ActiveState ActiveTCL which includes tk. I can run wish85
> successfully. Tcl/tk is installed.
>
> Like the first post says, after setting environment variables and
> compiling according to the instructions it doesn't work. And by that I
> mean that when I run require 'tk' from the irb it gives the error
> message;
>
> LoadError: no such file to load -- tk

I'm not using rubyinstaller. I'm compiling from source.

>> Assuming you installed Tk, you can compile a gem called tk_as_gem that
>> will work with your existing Tk installation. You'll need the Ruby
>> development kit (MSys tools, available from http://rubyinstaller.org/)
>> to compile it.


I don't understand what any of that means or why I'd want to do it. I'm
just a newb trying to learn ruby but can't get it to install with tk
following that tutorial.

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

From: Roger Pack on

> 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.

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).

recommendation: use rubyinstaller, then research the links I gave you,
which point eventually to either using tk_as_gem+devkit or this helper.

Also ffi-tk might fit the bill.

The rubyinstaller guys hope to make it easier to get to tk in the
future.
-r
--
Posted via http://www.ruby-forum.com/.

From: Rich Leblanc on
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.


> 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? That tutorial obviously works for some people.


>
> recommendation: use rubyinstaller, then research the links I gave you,
> which point eventually to either using tk_as_gem+devkit or this helper.
>

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.



> Also ffi-tk might fit the bill.
>
> The rubyinstaller guys hope to make it easier to get to tk in the
> future.
> -r

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

From: Roger Pack on
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.

To reproduce it go into your ext/tk library and run extconf.rb (and
nmake I guess). It should fail.

>> 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.

> 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...

>> Also ffi-tk might fit the bill.

Do you have any response to this (it's a gem)?

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
--
Posted via http://www.ruby-forum.com/.

From: Rich Leblanc on
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.
--
Posted via http://www.ruby-forum.com/.