Problem when require 'tk'

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.

Liu Ming wrote:

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

Justin C. wrote:

Liu Ming wrote:

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

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 forall’.
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=
–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.

Liu Ming wrote:

Justin C. wrote:

Liu Ming wrote:

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

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 forall’.
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=
–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:infu_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:ininstall’
from ./instruby.rb:99:in install' from ./instruby.rb:246 from ./instruby.rb:239:ineach’
from ./instruby.rb:239
from ./instruby.rb:348:in call' from ./instruby.rb:348 from ./instruby.rb:345:ineach’
from ./instruby.rb:345
from ./instruby.rb:344:in `each’
from ./instruby.rb:344
make: *** [do-install-nodoc] Error 1

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs