{"id":19211619,"url":"https://github.com/marcusg/dynamic_error_pages","last_synced_at":"2026-06-13T01:31:31.761Z","repository":{"id":59153105,"uuid":"13227809","full_name":"marcusg/dynamic_error_pages","owner":"marcusg","description":"Engine that helps you to generate dynamic error pages with Rails","archived":false,"fork":false,"pushed_at":"2014-06-16T08:32:49.000Z","size":288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-29T20:12:44.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcusg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-30T21:26:29.000Z","updated_at":"2014-06-16T08:32:49.000Z","dependencies_parsed_at":"2022-09-22T09:10:27.257Z","dependency_job_id":null,"html_url":"https://github.com/marcusg/dynamic_error_pages","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marcusg/dynamic_error_pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusg%2Fdynamic_error_pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusg%2Fdynamic_error_pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusg%2Fdynamic_error_pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusg%2Fdynamic_error_pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcusg","download_url":"https://codeload.github.com/marcusg/dynamic_error_pages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusg%2Fdynamic_error_pages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34269363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T13:43:07.459Z","updated_at":"2026-06-13T01:31:31.729Z","avatar_url":"https://github.com/marcusg.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamic_error_pages\n\n[![Gem Version](https://badge.fury.io/rb/dynamic_error_pages.png)](http://badge.fury.io/rb/dynamic_error_pages)\n[![Build Status](https://travis-ci.org/marcusg/dynamic_error_pages.png?branch=master)](https://travis-ci.org/marcusg/dynamic_error_pages)\n[![Code Climate](https://codeclimate.com/github/marcusg/dynamic_error_pages.png)](https://codeclimate.com/github/marcusg/dynamic_error_pages)\n[![Dependency Status](https://gemnasium.com/marcusg/dynamic_error_pages.png)](https://gemnasium.com/marcusg/dynamic_error_pages)\n\nEngine that helps you to generate dynamic error pages with Rails\n\n## Requirements\n\n```rails \u003e= 3.2```\n\n## What and why\n\nNormally Rails places some static error pages for special error codes (404, 422 and 500) inside the *public* directory. \nThese files are rendered if an error occures. But these templates are rendered without a layout. \nThis causes a bad integration into your custom layout. \nThe ``` dynamic_error_pages ``` gem let you create your own templates which are rendered inside your application layout. \n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'dynamic_error_pages'\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\n### Include your templates\n\nJust place your custom error templates inside the ``` app/views/dynamic_error_pages/errors ``` folder. The files need to\nbe named like the returned status code. The ``` 404.html.erb ``` would be used for status code 404 like ```ActiveRecord::RecordNotFound``` would raise for example.\n\nIf an error is raised and no template for the status code can be found, the engine will fallback to the ```404.html.erb```-template.\n\n### Include the routing\n\nActivate the routes for dynamic error handling in your ```routes.rb```. \n\n```\nYourApp::Application.routes.draw do\n  # ....\n  \n  dynamic_error_pages\n\nend\n```\n\n### Custom error handling\n\nYou may want to handle the incoming errors in a different way the gem handles this. Just create a subclass of \nFor example, create a file named ``` errors_controller.rb ``` in ``` app/controllers ```.\n\n\n    class ErrorsController \u003c DynamicErrorPages::ErrorsController\n      skip_before_filter :my_fancy_stuff # change your filters...\n\n      def show\n        # do whatever you want...\n        super\n      end\n    end\n\nAnd adjust the routes file to support your custom ```errors_controller```\n\n```\nDeviseDynamicErrorPages::Application.routes.draw do\n  # ....\n  \n  dynamic_error_pages :controller =\u003e \"errors\"\n\nend\n```\n\n## Limitations\n\nAt the moment, the gem will allways force :html format in the response. \nIn future versions, this behaviour will be extended.  \n\n## TODO\n\n1. Support more formats\n2. Write more tests\n\n## Run tests\n\n1. ```bundle install```\n2. ```rake appraisal```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusg%2Fdynamic_error_pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcusg%2Fdynamic_error_pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusg%2Fdynamic_error_pages/lists"}