detect ruby platform before spawning