BetterErrors/better_errors
54.3
Adequate · 26 September 2026
1.1k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Behavioural changes
Expanded test matrix for Rails 4.2 through 6.1
The gemfiles directory now includes dedicated dependency configurations for Rails versions 4.2, 5.0, 5.1, 5.2, 6.0, and 6.1 (including rc), as well as variations with Haml and binding\_of\_caller. This allows the library to be tested against a broader range of Ruby on Rails versions, ensuring compatibility across these specific framework versions.
gemfiles · high confidence
Improved Pry REPL integration and stability
The REPL module was refactored to improve compatibility with Pry 0.10.x and later versions. A new \Basic\ REPL class was introduced to handle standard evaluation, while the \Pry\ REPL class was updated to use a \Fiber\-based approach for better integration with Pry's internal state. Specific fixes include disabling Pry's pager, ensuring automatic indentation when using Pry in a block, and safely handling Pry's internal hooks to prevent errors when certain methods are not defined.
_lib/better\errors/repl · high confidence
Improved error page rendering and configuration for variable inspection
The error page now renders more cleanly in plain text requests (e.g., XML or non-HTML Accept headers). Users can now configure the maximum size for variable inspection to prevent performance issues, and can ignore inspection of specific classes to avoid unnecessary database queries or slow loading times.
(repo-wide) · high confidence
Improved syntax highlighting with light and dark themes
The Better Errors interface now features enhanced syntax highlighting for code snippets and console output, utilizing a new SCSS-based styling system. This includes a light theme (based on the 'Pastie' palette) and a dark theme (based on the 'Solarized' palette), allowing for better readability of error traces and stack traces in both light and dark UI modes.
_lib/better\errors/style · high confidence
Redesigned error page with separate templates for HTML, text, and variable info
The error page template has been refactored into three distinct templates: main.erb for the primary HTML interface, text.erb for plain-text output, and variable\_info.erb for displaying frame details. This separation allows for a more responsive and modular error display, supporting features like a live console (REPL) for interactive debugging, automatic indentation in the console, and better handling of Content Security Policy (CSP) via nonces. The UI now includes tabs for application and all frames, a hint for the live shell, and improved styling for stack traces and variable inspection.
_lib/better\errors/templates · high confidence
Refactor code formatting into dedicated HTML and Text formatters
The code formatting logic has been split into separate \CodeFormatter::HTML\ and \CodeFormatter::Text\ classes, replacing the previous monolithic implementation. This change introduces a new HTML structure that separates line numbers from the code block to allow easier copying, and utilizes the Rouge library for syntax highlighting instead of the previous tooling. Users will see a cleaner, more accessible code display where line numbers are distinct from the code content, and syntax highlighting is handled via CSS classes for better theming support.
_lib/better\_errors/code\formatter · high confidence
Refactored BetterErrors configuration and editor integration
The library's internal structure has been refactored, moving configuration options like \application\_root\, \logger\, and \ignored\_instance\_variables\ into the \BetterErrors\ module. The editor integration has been significantly expanded: the \ErrorFrame\ class was renamed to \StackFrame\, and the \Editor\ module now supports a wider range of presets (including Atom, Emacs, VSCode, and VSCodium) and allows custom format strings or procs for generating open-in-editor URLs. Additionally, the library now automatically detects the default editor from the \EDITOR\ environment variable and supports experimental Pry integration via \use\_pry!\.
lib · medium confidence
Refactored error page rendering and added editor support
The error page rendering was refactored to use separate template files (main, text, variable\_info) and a new CodeFormatter class for syntax highlighting, replacing the previous inline CSS and CodeRay-based highlighting. Editor support was added via a new Editor class that maps local file paths to editor URLs for supported editors like VS Code, Vim, and Sublime, configurable via the BETTER\_ERRORS\_EDITOR\_URL environment variable. The ErrorFrame class was renamed to StackFrame and now includes frame binding information for more accurate stack traces. The middleware was updated to use Rack::Request for IP validation and to handle CSRF tokens and Content-Security-Policy headers for the error page.
_lib/better\errors · high confidence
Test coverage
Added and updated specs for BetterErrors components; Added test coverage configuration and specs for the editor module; Added test coverage for HTML and text code formatters; Added tests for REPL providers.
Dependencies
Update dependencies and development tooling
The gemspec and Gemfile have been updated to modernize the dependency stack. Runtime dependencies now use Erubi and Rouge (replacing Erubis and CodeRay), and the minimum supported Ruby version is raised to 2.0.0. Development dependencies have been reorganized, adding RSpec 3.5, RSpec matchers, YARD, Sassc, and Kramdown (with version constraints for older Ruby versions). Simplecov and gem-release are now managed in the Gemfile rather than the gemspec, and metadata URIs for changelog, source code, and bug tracker are added to the gemspec.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 40 → 54 (+14.6)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 55 → 49 (-6.6)
- Readiness 25 → 54 (+29.1)
- Security 39 → 70 (+30.6)
- Accessibility 53 (new)
Resolved (14)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- No tests found
- Test reliability not included
- The README mentions config.consider_all_requests_local = true after upgrading from version 0.5.0 or less, but it does not state what happens if Better Errors is installed without this setting and the feature is used. (README.md)
New (21)
- Ambiguous naming for default editor retrieval. editor() is a generic getter that likely returns the currently configured editor, while default_editor() returns the system default. However, Editor.default_editor() also exists as a class method. It is unclear if BetterErrors.editor() is a getter for the instance variable set by BetterErrors.editor= or if it acts as a factory. The naming editor() vs default_editor() at the top-level module is confusing compared to the explicit Editor.default_editor() class method.
- Documentation: no architecture or design documentation
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent naming convention for getter/setter pair. Ruby convention typically uses the same name for both (e.g., provider and provider=). Here, the getter is provider() (with parentheses) and setter is provider=. While functionally clear, the explicit parentheses on the getter are non-idiomatic in Ruby when a simple attribute accessor would suffice, and inconsistent with other parts of the API like BetterErrors.editor() vs BetterErrors.editor=.
- Medium CVE: [GHSA redacted] (better_errors.gemspec)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- No dependency advisory monitoring
- Orphaned files with no living knowledge
- …and 1 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
BetterErrors/better_errors was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit fde3b7025db17b5cda13fcf8d08dfb3f76e189f6 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d0929f7ac71f.