Problem when require 'tk'

L

Liu Ming

Hi All,

My OS is Fedora. I download Ruby source and comppiled. I download
ActiveTcl and installed. But, when I do require 'tk', ruby say:
LoadError:no such file to load -- tk.

Please help me.

Thanks.
 
J

Justin Collins

Liu said:
Hi All,

My OS is Fedora. I download Ruby source and comppiled. I download
ActiveTcl and installed. But, when I do require 'tk', ruby say:
LoadError:no such file to load -- tk.

Please help me.

Thanks.

It seems you may have installed Ruby then Tcl, so you may need to
recompile Ruby to use it.
Try the information here: http://www.tkdocs.com/tutorial/install.html

-Justin
 
L

Liu Ming

Justin said:
It seems you may have installed Ruby then Tcl, so you may need to
recompile Ruby to use it.
Try the information here: http://www.tkdocs.com/tutorial/install.html

-Justin


Hi Justin,

Thanke you for your reply. I have followed the steps in the install
document to setup. But, I don't success. When I run "make" command, I
found the "tk" module can't be complie, please see the part of "make"
resule:

compiling tk
make[1]: Entering directory `/home/lm/Desktop/ruby/ext/tk'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/lm/Desktop/ruby/ext/tk'
compiling tk/tkutil
make[1]: Entering directory `/home/lm/Desktop/ruby/ext/tk/tkutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/lm/Desktop/ruby/ext/tk/tkutil'

I have another question. In the install document, % ./configure
--prefix=<install-dir>
--with-tcl-dir=/opt/ActiveTcl-8.5
--with-tk-dir=/opt/ActiveTcl-8.5
--with-tcllib=tclstub8.5
--with-tklib=tkstub8.5
--enable-tcltk_stubs
--enable-tcl-thread
--enable-pthread
In here, indicate tcllib to tclstub8.5, but, I can't found any file
called tclstub8.5 in my Tcl installed folder.

Thanks.
 
L

Liu Ming

Liu said:
Justin said:
It seems you may have installed Ruby then Tcl, so you may need to
recompile Ruby to use it.
Try the information here: http://www.tkdocs.com/tutorial/install.html

-Justin


Hi Justin,

Thanke you for your reply. I have followed the steps in the install
document to setup. But, I don't success. When I run "make" command, I
found the "tk" module can't be complie, please see the part of "make"
resule:

compiling tk
make[1]: Entering directory `/home/lm/Desktop/ruby/ext/tk'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/lm/Desktop/ruby/ext/tk'
compiling tk/tkutil
make[1]: Entering directory `/home/lm/Desktop/ruby/ext/tk/tkutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/lm/Desktop/ruby/ext/tk/tkutil'

I have another question. In the install document, % ./configure
--prefix=<install-dir>
--with-tcl-dir=/opt/ActiveTcl-8.5
--with-tk-dir=/opt/ActiveTcl-8.5
--with-tcllib=tclstub8.5
--with-tklib=tkstub8.5
--enable-tcltk_stubs
--enable-tcl-thread
--enable-pthread
In here, indicate tcllib to tclstub8.5, but, I can't found any file
called tclstub8.5 in my Tcl installed folder.

Thanks.

I try again. I get these error below:
/home/lm/Desktop/ruby/lib/fileutils.rb:1394:in `fu_each_src_dest': same
file: bin/ri and /home/lm/Desktop/ruby/bin/ri (ArgumentError)
from /home/lm/Desktop/ruby/lib/fileutils.rb:1411:in
`fu_each_src_dest0'
from /home/lm/Desktop/ruby/lib/fileutils.rb:1393:in
`fu_each_src_dest'
from /home/lm/Desktop/ruby/lib/fileutils.rb:840:in `install'
from ./instruby.rb:99:in `install'
from ./instruby.rb:246
from ./instruby.rb:239:in `each'
from ./instruby.rb:239
from ./instruby.rb:348:in `call'
from ./instruby.rb:348
from ./instruby.rb:345:in `each'
from ./instruby.rb:345
from ./instruby.rb:344:in `each'
from ./instruby.rb:344
make: *** [do-install-nodoc] Error 1

Thanks.
 

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
474,285
Messages
2,571,416
Members
48,107
Latest member
AmeliaAmad

Latest Threads

Top