error-tracking-ruby-on-rails

Integrate PostHog error tracking to capture and monitor Rails exceptions.

58|5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/PostHog/skills --skill error-tracking-ruby-on-rails
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-tracking-ruby-on-rails
Source: https://github.com/PostHog/skills/tree/main/skills/posthog/all/skills/error-tracking-ruby-on-rails
Command: npx skills add https://github.com/PostHog/skills --skill error-tracking-ruby-on-rails

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Rails developers commonly face challenges diagnosing runtime errors in production. This skill integrates PostHog error tracking to automatically capture exceptions, provide actionable insights, and improve issue triage without heavy changes to existing code.

Core Features & Use Cases

  • Automatic exception capture in Rails controllers and ActiveJob with optional auto-instrumentation.
  • Centralized dashboards, alerts, and search to quickly identify, triage, and remediate issues.
  • Use case: Monitor backend errors, track frequency, and surface stack traces to accelerate debugging.

Quick Start

Run the Rails installer, configure PostHog.init in your initializer, and verify automatic exception capture is enabled.

Frequently Asked Questions about error-tracking-ruby-on-rails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up automatic exception capture in a Ruby on Rails app?

Automatic exception capture in Rails requires running the PostHog installer, configuring api_key and host in config/initializers/posthog.rb, and enabling optional auto-instrumentation for controllers and ActiveJob.

What is the best way to monitor Rails production errors without changing existing error handling code?

Monitoring Rails production errors with minimal code changes is achieved by integrating PostHog error tracking, which automatically captures exceptions and provides centralized dashboards and alerts without heavy refactoring.

Do I need the posthog-ruby and posthog-rails gems to track exceptions in Rails?

Yes, tracking exceptions in Rails with this integration requires both the posthog-ruby and posthog-rails gems, along with the Rails installer output from rails generate posthog:install to configure the initialization file.

Can I capture backend errors from ActiveJob in Rails using PostHog error tracking?

Yes, capturing backend errors from ActiveJob is supported through optional ActiveJob instrumentation, allowing you to monitor job failures and surface stack traces alongside standard controller exceptions.

How does centralized error tracking help with debugging runtime errors in Rails?

Centralized error tracking accelerates debugging by aggregating runtime exceptions into searchable dashboards, tracking error frequency, and providing actionable stack traces to improve issue triage and remediation.