add ruby encoding preamble