Whenever my Windows rubyw script launches a subprocess, a command window
pops up and immediately disappears. How can I keep this from happening?
I keep a daily log of what I do at work. At the command line, I type
“log” to edit the current day’s log file. A Ruby script generates an
appropriate name for the file automatically, then launches vim.
Now I’m trying to use the Windows GUI, and I want to have an icon I can
click to launch gvim. Here’s the code:
Launch gvim on today’s logfile, e.g. on
logfile = Time.now.strftime(‘C:\Logs%Y%Y.%m%Y.%m.%d.txt’)
When I click the icon, I get the expected behavior, except that a
Windows cmd.exe window flashes on the screen first.