[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby tk -- how do you get it working?

7stud --

2/13/2008 10:16:00 PM

I recently upgraded to ruby 1.8.6 on mac os x 10.4.7. I had ruby tk
working before the upgrade, but now it's not working. When I run this
program:

require 'tk'


I get:

`require': no such file to load -- tk (LoadError)

Any tips on what I should do?
--
Posted via http://www.ruby-....

46 Answers

Jeremy Henty

2/13/2008 11:24:00 PM

0

On 2008-02-13, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
> `require': no such file to load -- tk (LoadError)
>
> Any tips on what I should do?

First: look for a file called tk.rb or tk.so or tk.<something> on your
system. If you can't find it, you need to find out why it's not
there. If you *can* find it, you need to find out why Ruby *can't*.

Regards,

Jeremy Henty

7stud --

2/14/2008 1:49:00 AM

0

Jeremy Henty wrote:
> On 2008-02-13, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
>> `require': no such file to load -- tk (LoadError)
>>
>> Any tips on what I should do?
>
> First: look for a file called tk.rb or tk.so or tk.<something> on your
> system. If you can't find it, you need to find out why it's not
> there. If you *can* find it, you need to find out why Ruby *can't*.
>

Uhh, yeah. That's what I'm doing. Thank you for your interest.
--
Posted via http://www.ruby-....

Hidetoshi NAGAI

2/14/2008 2:41:00 AM

0

From: 7stud -- <bbxx789_05ss@yahoo.com>
Subject: Re: ruby tk -- how do you get it working?
Date: Thu, 14 Feb 2008 10:48:47 +0900
Message-ID: <4eb078c86da334ca3f871d8b1109c339@ruby-forum.com>
> > First: look for a file called tk.rb or tk.so or tk.<something> on your
> > system. If you can't find it, you need to find out why it's not
> > there. If you *can* find it, you need to find out why Ruby *can't*.
>
> Uhh, yeah. That's what I'm doing. Thank you for your interest.

Please check tke result of "require 'tcltklib'".
If fail to do it, you don't have 'tcltklib.so' or
your 'tcltklib.so' cannot find available Tcl/Tk libraries.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

7stud --

2/14/2008 5:03:00 AM

0

Hidetoshi NAGAI wrote:
> From: 7stud -- <bbxx789_05ss@yahoo.com>
> Subject: Re: ruby tk -- how do you get it working?
> Date: Thu, 14 Feb 2008 10:48:47 +0900
> Message-ID: <4eb078c86da334ca3f871d8b1109c339@ruby-forum.com>
>> > First: look for a file called tk.rb or tk.so or tk.<something> on your
>> > system. If you can't find it, you need to find out why it's not
>> > there. If you *can* find it, you need to find out why Ruby *can't*.
>>
>> Uhh, yeah. That's what I'm doing. Thank you for your interest.
>
> Please check tke result of "require 'tcltklib'".
> If fail to do it, you don't have 'tcltklib.so' or
> your 'tcltklib.so' cannot find available Tcl/Tk libraries.

require 'tcltklib'

--output:--
`require': no such file to load -- tcltklib (LoadError)
--
Posted via http://www.ruby-....

Hidetoshi NAGAI

2/18/2008 3:40:00 AM

0

From: 7stud -- <bbxx789_05ss@yahoo.com>
Subject: Re: ruby tk -- how do you get it working?
Date: Thu, 14 Feb 2008 14:02:46 +0900
Message-ID: <5ff4baf0037188ad2e549d7a9a281b6e@ruby-forum.com>
> --output:--
> `require': no such file to load -- tcltklib (LoadError)
> --

Well, you have to make or search "tcltklib.so" for your environment.
Sources of "tcltklib.so" are included in Ruby's source tree.
But, "tcltklib.so" isn't made, if ext/tk/mkmf.rb can't find proper
Tcl/Tk libraries at compiling Ruby.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

7stud --

2/18/2008 6:59:00 AM

0

Hidetoshi NAGAI wrote:
> From: 7stud -- <bbxx789_05ss@yahoo.com>
> Subject: Re: ruby tk -- how do you get it working?
> Date: Thu, 14 Feb 2008 14:02:46 +0900
> Message-ID: <5ff4baf0037188ad2e549d7a9a281b6e@ruby-forum.com>
>> --output:--
>> `require': no such file to load -- tcltklib (LoadError)
>> --
>
> Well, you have to make or search "tcltklib.so" for your environment.
> Sources of "tcltklib.so" are included in Ruby's source tree.
> But, "tcltklib.so" isn't made, if ext/tk/mkmf.rb can't find proper
> Tcl/Tk libraries at compiling Ruby.


I don't understand what I'm supposed to do. All I know is that Ruby tk
used to work for me, and it was a hassle to setup. Then I upgraded to
ruby 1.8.6., and now Ruby tk doesn't work. On the other hand, Python tk
worked right out of the box for me.

Should I forget about Ruby tk and just use wxRuby?
--
Posted via http://www.ruby-....

7stud --

2/18/2008 7:53:00 AM

0

Hidetoshi NAGAI wrote:
> From: 7stud -- <bbxx789_05ss@yahoo.com>
> Subject: Re: ruby tk -- how do you get it working?
> Date: Thu, 14 Feb 2008 14:02:46 +0900
> Message-ID: <5ff4baf0037188ad2e549d7a9a281b6e@ruby-forum.com>
>> --output:--
>> `require': no such file to load -- tcltklib (LoadError)
>> --
>
> Well, you have to make or search "tcltklib.so" for your environment.
> Sources of "tcltklib.so" are included in Ruby's source tree.
>

I searched my computer and I don't have any file by that name.


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

Justin Collins

2/18/2008 9:00:00 AM

0

7stud -- wrote:
> Hidetoshi NAGAI wrote:
>
>> From: 7stud -- <bbxx789_05ss@yahoo.com>
>> Subject: Re: ruby tk -- how do you get it working?
>> Date: Thu, 14 Feb 2008 14:02:46 +0900
>> Message-ID: <5ff4baf0037188ad2e549d7a9a281b6e@ruby-forum.com>
>>
>>> --output:--
>>> `require': no such file to load -- tcltklib (LoadError)
>>> --
>>>
>> Well, you have to make or search "tcltklib.so" for your environment.
>> Sources of "tcltklib.so" are included in Ruby's source tree.
>> But, "tcltklib.so" isn't made, if ext/tk/mkmf.rb can't find proper
>> Tcl/Tk libraries at compiling Ruby.
>>
>
>
> I don't understand what I'm supposed to do. All I know is that Ruby tk
> used to work for me, and it was a hassle to setup. Then I upgraded to
> ruby 1.8.6., and now Ruby tk doesn't work. On the other hand, Python tk
> worked right out of the box for me.
>
> Should I forget about Ruby tk and just use wxRuby?
>

Are you building Ruby from source? If so, try going to the ext/tk
directory and running

ruby extconf.rb

If that seems to work, continue with make and make install.
If it does not seem to be finding the Tcl/Tk libraries, try reading the
README.tcltklib file in that directory.

I know I seemed to have a lot of trouble installing the Ruby Tk stuff as
well with the latest Ruby (on Linux, though).

-Justin

7stud --

2/18/2008 10:05:00 AM

0

Justin Collins wrote:
> 7stud -- wrote:
>>>>
>> worked right out of the box for me.
>>
>> Should I forget about Ruby tk and just use wxRuby?
>>
>
> Are you building Ruby from source?

I recently upgraded to Ruby 1.8.6. Ruby tk used to work for me, now it
doesn't.


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

Morton Goldberg

2/18/2008 7:00:00 PM

0

On Feb 18, 2008, at 2:52 AM, 7stud -- wrote:

> Hidetoshi NAGAI wrote:
>> From: 7stud -- <bbxx789_05ss@yahoo.com>
>> Subject: Re: ruby tk -- how do you get it working?
>> Date: Thu, 14 Feb 2008 14:02:46 +0900
>> Message-ID: <5ff4baf0037188ad2e549d7a9a281b6e@ruby-forum.com>
>>> --output:--
>>> `require': no such file to load -- tcltklib (LoadError)
>>> --
>>
>> Well, you have to make or search "tcltklib.so" for your environment.
>> Sources of "tcltklib.so" are included in Ruby's source tree.
>>
>
> I searched my computer and I don't have any file by that name.


On some platforms (e.g., OS X) it won't have the '.so' extension. On
my iMac I get

~ mg: sudo find / -name tcltklib.* -print
Password:
/Users/mg/Projects/Ruby/Docs/tcltklib.eng.txt
/usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle

If you are running OS X, tcltklib.bundle is what you should look for.

Regards, Morton