title: heroku not display custom error pages
body: <p>I followed the tutorial here to create custom error pages:</p>
  
  <p><a href="http://wearestac.com/blog/dynamic-error-pages-in-rails" rel="nofollow noreferrer">http://wearestac.com/blog/dynamic-error-pages-in-rails</a></p>
  
  <p>When I got to /404, /500, and /424, I can view my custom error pages locally.  However, after deploying with Heroku, I'm finding that my custom error pages aren't loading and, instead, the app is defaulting to the static 404.html and 500.html pages.  How can I go about fixing this error?</p>
  
  <p>I also tried the fix suggested in this post, but it didn't work for me:</p>
  
  <p><a href="https://stackoverflow.com/questions/4598983/user-friendly-error-pages-not-displaying-in-production-environment">User-friendly error pages not displaying in production environment</a></p>
  
  <p><strong>routes.rb</strong></p>
  
  <pre><code>  %w( 404 422 500 ).each do |code|
      get code, :to =&gt; "errors#show", :code =&gt; code
    end
  </code></pre>
  
  <p><strong>errors_controller.rb</strong></p>
  
  <pre><code>class ErrorsController &lt; ApplicationController
      def show
          render status_code.to_s, :status =&gt; status_code
      end
  
      protected
  
      def status_code
          params[:code] || 500
      end
  
  end
  </code></pre>