I'm on Rails 4 and Ruby 1.9.3
I use "strange" characters very often, so I have to declare UTF-8 encoding at the top of all .rb files.
Is there any way to set UTF-8 as the default encoding for Ruby 1.9.3?
I tried all answers, but when running rake db:seed
and creating an object whose attributes contain non US-ASCII
valid characters, I still receive this error:
`block in trace_on': invalid byte sequence in US-ASCII (ArgumentError)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…