After this: ruby executable won't start,
Now i have another issue with the following simple script:
require 'tk'
require 'tkextlib/tile'
root = TkRoot.new()
button = Tk::Tile::TButton.new(root) {text "Hello World"}.grid
button.command {system("ipconfig > info.txt")}
Tk.mainloop()
If i click the Hello World button, so the Windows cmd console will pop up for less then one second. No outputs on it, i also tried to redirect its output to a file and its empty.
If i run my scprit like this:
G:\WinRuby\efdsk>ruby efdsk.rb
There are no problems.
So this issue will appear when i run my exe built with ocra, and also when i run my script like this:
rubyw efdsk.rb
If i comment the following line,
button.command {system("ipconfig > info.txt")}
The issue will disappear, so i think it's something related to system(). I also tried to replace the previous line with this:
cmd="ipconfig > info.txt"
Open3.popen3(cmd) {|stdin, stdout, stderr, wait_thr|}
But the cmd will appear the same when i click the button.
This is my ruby version:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
And this issue will appear on the following ruby versions too, tested by me:
ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]
ruby 2.0.0p648 (2015-12-16) [x64-mingw32]
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
I tried to run the exe and to compile it on other pcs too, Windows 7 and 10. Still the same issue.