Waiting properly for ruby