title: Custom error pages for 404, 500 but where is the default 500 error message coming from?
body: <p>Currently in production I'm getting this text:</p>
  <pre class="lang-none prettyprint-override"><code>500 Internal Server Error
  If you are the administrator of this website, then please read this web application's
  log file and/or the web server's log file to find out what went wrong.
  </code></pre>
  <p>There isn't any HTML on that page. Where is this code situated? I don't have a <em>public/500.html</em> file.</p>
  <p>In my routes I have:</p>
  <pre><code>  get &quot;/404&quot;, :to =&gt; &quot;errors#error_404&quot;
    get &quot;/422&quot;, :to =&gt; &quot;errors#error_404&quot;
    get &quot;/500&quot;, :to =&gt; &quot;errors#error_500&quot;
    get &quot;/505&quot;, :to =&gt; &quot;errors#error_505&quot;
  </code></pre>
  <p>ErrorsController:</p>
  <pre><code>class ErrorsController &lt; ApplicationController
  
    def sub_layout
      &quot;left&quot;
    end
  
    def error_404
      render :status =&gt; 404, :formats =&gt; [:html], :layout =&gt; &quot;white&quot;, :sub_layout =&gt; &quot;left&quot;
    end
  
    def error_422
      render :status =&gt; 422, :formats =&gt; [:html], :layout =&gt; &quot;white&quot;, :sub_layout =&gt; &quot;left&quot;
    end
  
    def error_500
      render :status =&gt; 500, :formats =&gt; [:html], :layout =&gt; &quot;white&quot;, :sub_layout =&gt; &quot;left&quot;
    end
  
    def error_505
      render :status =&gt; 505, :formats =&gt; [:html], :layout =&gt; &quot;white&quot;, :sub_layout =&gt; &quot;left&quot;
    end
  
  end
  </code></pre>
  <p>How do I make it load my custom errors always? On some errors, it just throws those two lines of text coming somewhere from the Ruby on Rails core. I want it to pickup my custom styled error pages every time!</p>