Skip to content
CAI
Software that uses CAICheck a score

BetterErrors/better_errors

45.6

Weak · 14 November 2026

1.1k

lines of production code

Ruby

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 46 → 46 (+0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 65 → 62 (-2.7)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 43 (+0.0)
  • Readiness 56 → 56 (+0.0)
  • Security 68 → 53 (-15.4)
  • Accessibility 37 → 41 (+3.2)

Findings

  • No change — the same findings as the prior survey.

Written by cca.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 14 November 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.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.