Skip to content

Example rails app demonstrating using a custom Heroku buildpack to serve custom error pages as static files

License

Notifications You must be signed in to change notification settings

johnboyes/rails-heroku-custom-error-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example rails app demonstrating using a custom Heroku buildpack to serve custom error pages as static files

See https://medium.com/@tair/custom-error-pages-in-rails-you-re-doing-it-wrong-ba1d20ec31c0

Set up

Deploy the app to Heroku in the normal way, then:

Manually set your buildpack to Heroku's default Ruby buildpack

heroku buildpacks:set heroku/ruby

Append the custom buildpack-ruby-rails-custom-error-pages buildpack to your buildpack list:

heroku buildpacks:add https://github.com/johnboyes/buildpack-ruby-rails-custom-error-pages

More info: Heroku Dev Center article on multiple buildpacks

Now if you visit your Heroku app in production and enter a url that will not be found, you will see the custom 404 page.

License

MIT, see the LICENSE.md file.

About

Example rails app demonstrating using a custom Heroku buildpack to serve custom error pages as static files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages