ncat? 2. Do you just want stdout or do you need stderr as well? Or even separated out? 3. How big is your output? Do you want to hold the entire result in memory? 4. Do you want to read some of your output while the subprocess is still running? 5. Do you need result codes? 6. Do you need a ruby object that represents the process and lets you kill it on demand?
ncatsessions in Ruby? If you're familiar with Python, you've probably used
python -c 'import pty; pty.spawn("/bin/sh")'. In Ruby it's really easy using
system. The main trick is to forward STDERR to STDOUT so you can see system errors.