MindTheGap
01-17-2008, 01:12 PM
How can I use Tk with Ruby?
I tried the statement:
require 'tk'
But it gives me this error:
LoadError: no such file to load -- tk
Do I have to install tk for it to work?
shyam
01-17-2008, 01:38 PM
Do I have to install tk for it to work?
ofcourse... its like do i have to install word before i can open a word document
oesxyl
01-17-2008, 02:49 PM
How can I use Tk with Ruby?
I tried the statement:
require 'tk'
But it gives me this error:
LoadError: no such file to load -- tk
Do I have to install tk for it to work?
look also to this:
http://members.chello.nl/k.vangelder/ruby/learntk/
best regards
MindTheGap
01-17-2008, 03:24 PM
Ok. I dowloaded tk. Where do I put the file?
I put it in the ruby folder. I typed ./configure, then make but got this error:
compiling readline
gcc -I. -I../../.ext/include/i686-darwin8.11.1 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g -O2 -pipe -fno-common -o readline.o -c readline.c
readline.c: In function 'filename_completion_proc_call':
readline.c:659: error: 'filename_completion_function' undeclared (first use in this function)
readline.c:659: error: (Each undeclared identifier is reported only once
readline.c:659: error: for each function it appears in.)
readline.c:659: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:684: error: 'username_completion_function' undeclared (first use in this function)
readline.c:684: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
oesxyl
01-17-2008, 03:51 PM
Ok. I dowloaded tk. Where do I put the file?
I put it in the ruby folder. I typed ./configure, then make but got this error:
compiling readline
gcc -I. -I../../.ext/include/i686-darwin8.11.1 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g -O2 -pipe -fno-common -o readline.o -c readline.c
readline.c: In function 'filename_completion_proc_call':
readline.c:659: error: 'filename_completion_function' undeclared (first use in this function)
readline.c:659: error: (Each undeclared identifier is reported only once
readline.c:659: error: for each function it appears in.)
readline.c:659: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:684: error: 'username_completion_function' undeclared (first use in this function)
readline.c:684: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
- seems you don't have the proper headers. Do you run on mac?
- tk work with tcl, do you have tcl installed?
best regards
MindTheGap
01-17-2008, 04:19 PM
Yeah, I'm on a mac. Where can I get the proper headers?
Where can I get tcl from?
Thanks.
oesxyl
01-17-2008, 04:31 PM
Yeah, I'm on a mac. Where can I get the proper headers?
usualy they come with tcl and tk but some come with system libs.
Where can I get tcl from?
same place you get tk.
Sorry, I have no experience with this on mac, I don't think that my answers could help in this case.
best regards
MindTheGap
01-17-2008, 04:44 PM
Ok, thanks.
How do I install tk/tcl after I have downloaded it?
oesxyl
01-17-2008, 05:11 PM
Ok, thanks.
How do I install tk/tcl after I have downloaded it?
Few years ago I use this for a multiplatform project and I was happy:
http://www.activestate.com/Products/activetcl/
PS: seems to be a problem with readline and ruby 1.8.6 on mac.
http://wincent.com/knowledge-base/Building_and_installing_Ruby_1.8.6_on_Mac_OS_X_Tiger
best regards