Here is a simple Ruby script:
puts `ls -laG`
In OS X ls, -G for color.
When running under bash, I get color output. When the above is executed from a Ruby script, I do not see the ANSI color or escape sequence in the resulting result.
From what I read, I think this is because the script does not work like tty. Is there a way to run a command as if it were running under a true tty session - or something like that?
source
share