Forum: Ruby Tk under Windows XP

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.
Jimmy G. (Guest)
on 2007-03-24 22:44
(Received via mailing list)
Hi,

I am trying learn how to use TK in Ruby to make my first GUI. I have win
XP  and Installed TK from  "ActiveState/ ActiveTcl" .
But When I run this script I get error !. Any ideas why ?..  Do I have
to
install TK/ under the ruby dir ? if so how?.... now its installed
in  "c:\tcl\" dir.
Also how to I run this sample script ?, in windows ?.. ..
Also please let me know some basic scripts for TK-RUBY.

Script :
equire 'tk'
hello = TkRoot.new {title "Hello World"}
Tk.mainloop

Error :
C:\ruby\jimmy>ruby hello.rb
c:/ruby/lib/ruby/1.8/i386-mswin32/tcltklib.so: 126: The specified module
could not be found.
ror)
         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 hello.rb:1

C:\ruby\jimmy>


Best Regards,
Jimmy G.
Harry H. (Guest)
on 2007-03-25 17:28
(Received via mailing list)
On 3/25/07, Jimmy G. <removed_email_address@domain.invalid> wrote:

> Script :
> equire 'tk'
> hello = TkRoot.new {title "Hello World"}
> Tk.mainloop
>

Hi,

I guess you just pasted incorrectly, but

equire 'tk'
should be require 'tk'

Anyway, I am not sure how to fix your problem the way you want to.
But if you are willing to have a slightly older version of Ruby, you
can get everything installed correctly and easily with the one click
installer.

Good luck,

Harry

--

http://www.kakueki.com/ruby/list.html
Japanese Ruby List Subjects in English
Harry H. (Guest)
on 2007-03-26 15:16
(Received via mailing list)
On 3/25/07, Jimmy G. <removed_email_address@domain.invalid> wrote:
 .
> C:\ruby\jimmy>ruby hello.rb
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>          from hello.rb:1
>
> C:\ruby\jimmy>
>
>
> Best Regards,
> Jimmy G.
>


http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/rub...

Harry


--

http://www.kakueki.com/ruby/list.html
Japanese Ruby List Subjects in English
This topic is locked and can not be replied to.