How to Add Custom Error Pages in a Rails Application

The exception_handler gem is a great gem for easily integrating custom error pages in a Rails application (instead of the ugly grey screen of death). However the Gem page itself is a little confusing, so here are the steps I use.

Add this to the `Gemfile`:

# Gemfile
gem "exception_handler", "~0.4"


Then run the installer commands:

rails g exception_handler:views


And that's literally it. From there you can edit the view files the gem provides.