I’m receiving this error whenever I edit an user’s information. The localhost tells me that the error occured around this line…
<%= debug(params) if Rails.env.development? %>
Parameters returned…
{"utf8"=>"✓",
"_method"=>"put",
"authenticity_token"=>"hC/BQTSBodv+qlvhYnxJ4mqMl+w3G1FLwopxpbmsm/g=",
"user"=>{"name"=>"jason",
"email"=>"jason1",
"password"=>"[FILTERED]",
"password_confirmation"=>"[FILTERED]"},
"commit"=>"Save changes",
"id"=>"7"}
What’s causing this error and how do I fix it?
config.encoding = "utf-8"in your application.rb file.Add this code in your environment.rb:
Encoding.default_external = Encoding::UTF_8Encoding.default_internal = Encoding::UTF_8If you are working with MySql use the “mysql2” gem.
# encoding: utf-8at the top of your file.