(Medium Blog)[https://medium.com/@sulmanweb/custom-exception-404-and-500-handling-in-rails-5-c4fa3432b899] gives details how to handle the errors in Rails 5
sulmanweb/Error-Handling-in-Rails-5
This repo shows how to manually enable error handling like 404 500
RubyMIT