Yep; caused me a lot of trouble before I worked it out. The easy way around this is to forward the output to a file, so it doesn't stop the exe running.
# You'll want to redirect stdout too
original_stderr = $stderr.dup
$stderr.reopen File.join(LOG_PATH, 'stderr.log')
$stderr.sync = true
# run the game itself
$stderr.reopen(original_stderr)
Full example code
https://github.com/Spooner/sidney/blob/master/lib/sidney.rbw