Forum: Ruby how to install/use ruby and tk on winxp?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9c56ce5881f789406c029b47ec742c4c?d=identicon&s=25 Sean (Guest)
on 2007-01-22 09:06
(Received via mailing list)
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?
2ee1a7960cc761a6e92efb5000c0f2c9?d=identicon&s=25 William James (Guest)
on 2007-01-22 11:46
(Received via mailing list)
Sean wrote:
> 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.
4371f8fa1c3574e74d8f88c77d23e7d7?d=identicon&s=25 Harry (Guest)
on 2007-01-22 12:15
(Received via mailing list)
On 1/22/07, Sean <sroun.ngo@gmail.com> wrote:
> 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?
>
>
>
If you use the one click installer tk is included.
http://rubyforge.org/projects/rubyinstaller/

I don't know of any books about ruby tk but try this;
http://www.rubycentral.com/book/ext_tk.html

Harry
9c56ce5881f789406c029b47ec742c4c?d=identicon&s=25 Sean (Guest)
on 2007-01-22 17:25
(Received via mailing list)
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
4371f8fa1c3574e74d8f88c77d23e7d7?d=identicon&s=25 Harry (Guest)
on 2007-01-23 01:15
(Received via mailing list)
On 1/23/07, Sean <sroun.ngo@gmail.com> wrote:
>
> 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/...

Harry
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2007-01-23 02:23
(Received via mailing list)
From: "Sean" <sroun.ngo@gmail.com>
Subject: Re: how to install/use ruby and tk on winxp?
Date: Tue, 23 Jan 2007 01:25:06 +0900
Message-ID: <1169482919.672932.294980@s34g2000cwa.googlegroups.com>
> 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."
>
> On Jan 22, 5:14 am, Harry <ruby.hardw...@gmail.com> wrote:
> > On 1/22/07, Sean <sroun....@gmail.com> wrote:> Hello
> > > I also installed activestate tcl 8.5.0.0 beta-6. From there on, I don't
                                       ^^^
> > > really know how to bind Ruby andtktogether to create some GUI.

Please use ActiveTcl 8.4.x.
Maybe, tcltklib in One-Click-Installer is configured
without "--enable-tcltk_stubs" option.
9c56ce5881f789406c029b47ec742c4c?d=identicon&s=25 Sean (Guest)
on 2007-01-23 23:41
(Received via mailing list)
Cool it works!!!

Many thx to everybody.
87af02770a6a6780026d37850db1f967?d=identicon&s=25 unknown (Guest)
on 2007-02-12 05:40
(Received via mailing list)
On Jan 23, 2:34 pm, "Sean" <sroun....@gmail.com> wrote:
> > > "This application has failed to start because tk84.dll was not found. 
^^^^^^^^> re-installing the application may fix this problem."
>
> > > On Jan 22, 5:14 am, Harry <ruby.hardw...@gmail.com> wrote:
> > > > On 1/22/07, Sean <sroun....@gmail.com> wrote:> Hello
> > > > > I also installed activestate tcl 8.5.0.0 beta-6. From there on, I don't 
^^^
>
> > > > > really know how to bind Ruby andtktogether to create some GUI.Please use 
ActiveTcl 8.4.x.
> > Maybe, tcltklib in One-Click-Installer is configured
> > without "--enable-tcltk_stubs" option.
> > --
> > Hidetoshi NAGAI (n...@ai.kyutech.ac.jp)

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
5703bded03b592418ac49058063ad52b?d=identicon&s=25 John Doe (oxymorphone)
on 2008-07-04 16:27
> 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.
This topic is locked and can not be replied to.