Пытаюсь скомпелировать exe приложение из руби при помощи ocra. Самый простой скрипт превращается в exe без проблем. А теперь мой скрипт включает Tk и ничего не выходит.
Скрипт:
-----------------------------------------------------------------------
Код:
require 'tk'
require 'tkextlib/tile'
root = TkRoot.new {title "Feet to Meters"}
content = Tk::Tile::Frame.new(root) {padding "3 3 12 12"}.grid( :sticky => 'nsew')
TkGrid.columnconfigure root, 0, :weight => 1; TkGrid.rowconfigure root, 0, :weight => 1
$feet = TkVariable.new; $meters = TkVariable.new
f = Tk::Tile::Entry.new(content) {width 7; textvariable $feet}.grid( :column => 2, :row => 1, :sticky => 'we' )
Tk::Tile::Label.new(content) {textvariable $meters}.grid( :column => 2, :row => 2, :sticky => 'we');
Tk::Tile::Button.new(content) {text 'Calculate'; command {calculate}}.grid( :column => 3, :row => 3, :sticky => 'w')
Tk::Tile::Label.new(content) {text 'feet'}.grid( :column => 3, :row => 1, :sticky => 'w')
Tk::Tile::Label.new(content) {text 'is equivalent to'}.grid( :column => 1, :row => 2, :sticky => 'e')
Tk::Tile::Label.new(content) {text 'meters'}.grid( :column => 3, :row => 2, :sticky => 'w')
TkWinfo.children(content).each {|w| TkGrid.configure w, :padx => 5, :pady => 5}
f.focus
root.bind("Return") {calculate}
def calculate
begin
$meters.value = (0.3048*$feet*10000.0).round()/10000.0
rescue
$meters.value = ''
end
end
Tk.mainloop
-----------------------------------------------------------------------------
А вот что получаю в консоли:
-----------------------------------------------------------------------------
Код:
C:\Users\Anton\Desktop\Programs>ocra test.rb
=== Loading script to check dependencies
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Pack
=== WARNING: #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Pack was defined autoloadable, but caused NameError
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Place
=== WARNING: #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Place was defined autoloadable, but caused NameError
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Canvas
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::CheckButton
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::LabelFrame
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Listbox
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Menu
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Message
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::PanedWindow
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Scale
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Scrollbar
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Spinbox
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Text
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Toplevel
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Clock
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::OptionObj
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::Fontchooser
=== Attempting to trigger autoload of #<Class:#<Tk::Tile::TEntry:0x000000051bd438>>::MacResource
C:/Ruby23-x64/lib/ruby/2.3.0/tk/macpkg.rb:42:in `<module:MacResource>': RuntimeError (RuntimeError)
from C:/Ruby23-x64/lib/ruby/2.3.0/tk/macpkg.rb:31:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:477:in `const_get'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:477:in `block (3 levels) in attempt_load_autoload'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:471:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:471:in `block (2 levels) in attempt_load_autoload'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:469:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:469:in `block in attempt_load_autoload'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:463:in `loop'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:463:in `attempt_load_autoload'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:715:in `build_exe'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ocra-1.3.6/bin/ocra:1177:in `block in <top (required)>'
--------------------------------------------------------------------------------
Может кто подскажет в чем проблема?