ron
August 25, 2006, 11:12am
1
Hi,
I am having problems getting Ruby/Tk to work. Below are the results of
my attempts to get Tk working.
My configure command:
./configure --prefix=/opt/ruby --enable-thread
Results of make:
compiling tk
compiling tk/tkutil
compiling win32ole
compiling zlib
When I try to use tk, I get this output:
irb(main):001:0> require ‘tk’
LoadError: no such file to load – tk
from (irb):1:in `require’
from (irb):1
I have tcl/tk installed on my computer.
My environment is RedHat ES 4.0 32 bit.
What am I doing wrong?
Thanks.
Ron
ron
August 28, 2006, 3:39pm
2
Ron wrote:
Hi,
irb(main):001:0> require ‘tk’
LoadError: no such file to load – tk
from (irb):1:in `require’
from (irb):1
do you have the line
require “tk”
at the top of your program?
ron
August 28, 2006, 4:49pm
3
Yes. The problem manifests when used in a script or using irb (see
below).
Really lost on this one and I’m hoping someone can give me some insight.
Thanks.
ron
ron
August 28, 2006, 4:54pm
4
Ron Reidy wrote:
Yes. The problem manifests when used in a script or using irb (see
below).
Really lost on this one and I’m hoping someone can give me some insight.
Thanks.
ron
Know the feeling. Im new to this ruby/tk myself but I got my windows
installation working.
Have you checked directory paths?
Could the address be wrong for tk or ruby?
If its installed maybe the problem is it cant find it?
Ive also seen the line
#!/usr/bin/env ruby
added to programs to help it work.
ron
August 28, 2006, 5:07pm
5
Mer G. wrote:
Ive also seen the line
#!/usr/bin/env ruby
added to programs to help it work.
That shouldn’t do a thing to Tk, and especially not on Windows (Cygwin
notwithstanding). Only Linux shells interpret that line.
David V.
ron
August 29, 2006, 3:31am
6
From: “Ron” [email protected]
Subject: Problems compiling Ruby/Tk
Date: Fri, 25 Aug 2006 18:11:07 +0900
Message-ID: [email protected]
irb(main):001:0> require ‘tk’
LoadError: no such file to load – tk
from (irb):1:in `require’
from (irb):1
Please check the followings.
(1) Is there tcltklib.so' on /opt/ruby/lib/ruby/1.8/i686-linux/’ ?
( 1.8' and 'i686-linux' depend on your binary. ) If not, probably, you failed to compile it. Please read /ext/tk/README.tcltklib’.
(2) Did you execute the right binary?
Please check RUBY_VERSION and RUBY_RELEASE_DATE on the running irb.
Do those values denote your new ruby binary?
If not, please try “/opt/ruby/bin/ruby -v /opt/ruby/bin/irb”.
ron
August 28, 2006, 5:14pm
7
That shouldn’t do a thing to Tk, and especially not on Windows (Cygwin
notwithstanding). Only Linux shells interpret that line.
Ok. Wasnt sure of its purpose.
ron
August 29, 2006, 5:41am
8
Hidetoshi,
Thank you so much. The README file had the answer and all is working.
rr