how to install/use ruby and tk on winxp?

S

Sean

Hello
Im a newby with ruby. Im trying to do some user interface with tk. I
have Ruby 1.8.5-21 and it's working fine.
I also installed activestate tcl 8.5.0.0 beta-6. From there on, I don't
really know how to bind Ruby and tk together to create some GUI.
Any suggestion?
 
W

William James

Sean said:
Hello
Im a newby with ruby. Im trying to do some user interface with tk. I
have Ruby 1.8.5-21 and it's working fine.
I also installed activestate tcl 8.5.0.0 beta-6. From there on, I don't
really know how to bind Ruby and tk together to create some GUI.
Any suggestion?

You probably should have used the one-click installer.
 
H

Harry

S

Sean

hello,

I used the one click installer to install Ruby.
then I try to run a test using this code:
require 'tk'
root = TkRoot.new { title "Ex1" }TkLabel.new(root) {
text 'Hello, World!'
pack { padx 15 ; pady 15; side 'left' }
}
Tk.mainloop

however a popup tells me that:
"This application has failed to start because tk84.dll was not found.
re-installing the application may fix this problem."
So should i reinstall ruby again?
And here is the cmd line error screen.
C:\ruby_prog>ruby gui.rb
c:/ruby/lib/ruby/1.8/i386-mswin32/tcltklib.so: 126: The specified
module could not be found. -
c:/ruby/lib/ruby/1.8/i386-mswin32/tcltklib.so (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from c:/ruby/lib/ruby/1.8/tk.rb:7
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from gui.rb:1
 
H

Harry

hello,

I used the one click installer to install Ruby.
then I try to run a test using this code:
require 'tk'
root = TkRoot.new { title "Ex1" }TkLabel.new(root) {
text 'Hello, World!'
pack { padx 15 ; pady 15; side 'left' }
}
Tk.mainloop

however a popup tells me that:
"This application has failed to start because tk84.dll was not found.
re-installing the application may fix this problem."
So should i reinstall ruby again?


I installed an older version with no problem.
It looks like others have experienced this, too.

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/183687

Harry
 
H

Hidetoshi NAGAI

From: "Sean" <[email protected]>
Subject: Re: how to install/use ruby and tk on winxp?
Date: Tue, 23 Jan 2007 01:25:06 +0900
Message-ID: said:
however a popup tells me that:
"This application has failed to start because tk84.dll was not found. ^^^^^^^^
re-installing the application may fix this problem."

Please use ActiveTcl 8.4.x.
Maybe, tcltklib in One-Click-Installer is configured
without "--enable-tcltk_stubs" option.
 
S

Sean

Cool it works!!!

Many thx to everybody.

From: "Sean" <[email protected]>
Subject: Re: how to install/use ruby andtkon winxp?
Date: Tue, 23 Jan 2007 01:25:06 +0900


Maybe, tcltklib in One-Click-Installer is configured
without "--enable-tcltk_stubs" option.
 
B

bhayes84

Cool it works!!!

Many thx to everybody.

A couple of additional details:
I also solved the above problem in Ruby 184-17 under WinXP by
installing
ActiveState's ActiveTcl 8.4, but I had to copy these folders and
files:
- copy the folders 'tcl8.4' and 'tk8.4' from Tcl/lib to ruby/lib
- copy tk84.dll from Tcl/bin to ruby/bin
 
J

John Doe

A couple of additional details:
I also solved the above problem in Ruby 184-17 under WinXP by
installing
ActiveState's ActiveTcl 8.4, but I had to copy these folders and
files:
- copy the folders 'tcl8.4' and 'tk8.4' from Tcl/lib to ruby/lib
- copy tk84.dll from Tcl/bin to ruby/bin

I fixed the same problem by simply uninstalling ActiveTcl 8.5.x and
installing the last of the 8.4.x series. Unlike above, I didn't have to
copy any folders or DLL's (at least not yet).

Thanks for helping me fix the problem, folks! For others with this same
problem, start by ensuring you have ActiveTcl 8.4.x instead of 8.5.x
installed.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top