title: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8) with portuguese brazilian characters
body: <p>I'm trying to deploy an application on an Ubuntu 14.02 server with NGINX and PUMA and when I try to access static pages on the server with characters in brazilian portuguese and WITHOUT access to the database, the page is not showed and the following error gets logged:</p>
  
  <p><strong>ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)</strong></p>
  
  <p>I read a lot of posts/answers regarding this error and tried everything.</p>
  
  <p>Ruby version: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]
  Rails version: Rails 4.2.4</p>
  
  <p>The command locale in the server return the following:</p>
  
  <pre><code>LANG=en_US.UTF-8
  LANGUAGE=en_US.UTF-8
  LC_CTYPE="en_US.UTF-8"
  LC_NUMERIC="en_US.UTF-8"
  LC_TIME="en_US.UTF-8"
  LC_COLLATE="en_US.UTF-8"
  LC_MONETARY="en_US.UTF-8"
  LC_MESSAGES="en_US.UTF-8"
  LC_PAPER="en_US.UTF-8"
  LC_NAME="en_US.UTF-8"
  LC_ADDRESS="en_US.UTF-8"
  LC_TELEPHONE="en_US.UTF-8"
  LC_MEASUREMENT="en_US.UTF-8"
  LC_IDENTIFICATION="en_US.UTF-8"
  LC_ALL=en_US.UTF-8
  </code></pre>
  
  <p>My application.rb contains the line:</p>
  
  <pre><code>config.encoding = "utf-8"
  </code></pre>
  
  <p>My environment.rb contais the lines:</p>
  
  <pre><code>Encoding.default_external = Encoding::UTF_8
  Encoding.default_internal = Encoding::UTF_8
  </code></pre>
  
  <p>I already putted the # encoding: "utf-8" on top of my html.erb files without success.</p>