Problems compiling Ruby/Tk

R

Ron

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
 
M

Mer Gilmartin

Ron said:
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?
 
M

Mer Gilmartin

Ron said:
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.
 
D

David Vallner

Mer said:
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 Vallner
 
M

Mer Gilmartin

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

Hidetoshi NAGAI

From: "Ron" <[email protected]>
Subject: Problems compiling Ruby/Tk
Date: Fri, 25 Aug 2006 18:11:07 +0900
Message-ID: said:
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

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 `<ruby-source>/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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top