How can I avoid putting the magic encoding comment on top of every UTF-8 file in Ruby 1.9? December 16, 2023 by Tarik I think you can either use -E utf-8 command line argument to ruby, or set your RUBYOPT environment variable to "-E utf-8"