A Rack middleware that replaces standard Rails/Rack error pages with a more informative and interactive debugging interface.
Better Errors is a Ruby gem that replaces the standard error pages in Rails and Rack applications with a feature-rich debugging interface. It solves the problem of uninformative error pages by providing detailed stack traces, variable inspection, and an interactive REPL to help developers quickly diagnose issues during development.
Ruby on Rails and Rack application developers who need enhanced debugging capabilities in their development environment.
Developers choose Better Errors because it transforms error pages into interactive debugging consoles, offering immediate access to variable data, source code context, and a live REPL—significantly reducing time spent troubleshooting compared to standard error pages.
Better error page for Rack apps
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a REPL on every stack frame, allowing real-time code execution during errors, as showcased in the features list and screenshot for immediate troubleshooting.
Displays full stack traces with highlighted source code and variable inspection at each frame, giving detailed insights beyond standard error pages.
Includes direct links to open error locations in preferred editors via the EDITOR environment variable, speeding up navigation and fixes.
Delivers useful error information for non-HTML requests like AJAX and APIs, ensuring consistent debugging across all request types as noted in the README.
Cannot be used in production or on remote hosts due to risks of exposing sensitive data and REPL access, restricting it strictly to local development.
With multi-worker servers like Unicorn or Puma, it can cause session expiration due to context switching, requiring workarounds such as reducing workers or using single-process servers.
Advanced features like REPL and variable inspection require the binding_of_caller gem, adding an extra dependency that might not be installed by default.