[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem when require 'tk'

Liu Ming

3/17/2008 1:27:00 AM

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.
--
Posted via http://www.ruby-....

3 Answers

Justin Collins

3/17/2008 4:01:00 AM

0

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/in...

-Justin

Liu Ming

3/17/2008 2:23:00 PM

0

Justin Collins 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/in...
>
> -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.
--
Posted via http://www.ruby-....

Liu Ming

3/17/2008 3:03:00 PM

0

Liu Ming wrote:
> Justin Collins 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/in...
>>
>> -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.

--
Posted via http://www.ruby-....