`spawn` is in ruby 1.9 and newer but RubyGems still supports ruby 1.8.7.  Can you switch this to use fork + exec instead here?