From: garyo hosu Date: 2010-02-03T13:21:36+09:00 Subject: [ruby-list:46847] Ruby/Tkが動かなくなりました(Ruby 1.8.5->1.8.7) 皆さん、こんにちは。garyoといいます。 昨日,Ruby 1.8.5でRuby/Tkを動かしていたのですが、 http://arton.hp.infoseek.co.jp/indexj.htmlから ActiveScriptRuby 1.8.7(p174) with-winsock2をDLして入れた所、Ruby/Tkが起動しなくなりました。 1.ソース、2.実行結果(エラー内容)、3.実行環境は以下の通りです。 ※以前Ruby1.8.5の時はActiveTcl 8.5.2.0を入れると動かなかったので、ActiveTcl 8.4.19.0を入れたのですが、 最新のRuby1.8.7ではActiveTcl 8.5.2.0でないと動かないのでしょうか? 1.ソース --- #!/usr/bin/env ruby require 'tk' TkButton.new { text "Exit" command proc { exit } pack } Tk.mainloop ---- 2.実行結果(エラー内容) ---- C:/ruby-1.8/lib/ruby/1.8/tk.rb:1127:in `initialize': Can't find a usable init.tcl in the following directories: (RuntimeError) C:/ruby-1.8/lib/tcl8.5 C:/ruby-1.8/lib/tcl8.5 C:/lib/tcl8.5 C:/ruby-1.8/library C:/library C:/tcl8.5.2/library C:/tcl8.5.2/library This probably means that Tcl wasn't installed properly. from C:/ruby-1.8/lib/ruby/1.8/tk.rb:1127:in `new' from C:/ruby-1.8/lib/ruby/1.8/tk.rb:1127 from C:/ruby-1.8/project/rubytk/hello.rb:3:in `require' from C:/ruby-1.8/project/rubytk/hello.rb:3 Complete(1) ---- 3.実行環境 OS:WindowXP ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-mswin32] TCL: ActiveTcl 8.4.19.0