Is there any gem which adds # encoding: UTF-8 to each Ruby file automatically?
Or is there any other way to prevent from the invalid multibyte char (US-ASCII) error in the entire Ruby on Rails project (not in a single class only)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try magic_encoding gem, it can insert uft-8 magic comment to all ruby files in your app.
[EDIT]
Having switched to SublimeText now I use auto-encoding-for-ruby plugin.