title: invalid byte sequence in UTF-8 for single quote in Ruby
body: <p>I'm using the following code to show description in template:</p>
  
  <pre><code>json.description resource.description if resource.description.present?
  </code></pre>
  
  <p>It gives me invalid byte sequence in UTF-8 error. I dig this a little bit, and find out the issue is my description has single quote as ’ instead of '. Wondering what's the best way to fix this encoding issue? Description is input by user and I have no control over it. Another weird issue is, I have multiple test environments, they all have the same Ruby and Rails version and they are running the same code, but only one of the environment has this error.</p>