Ruby on Rails error tracking installation
Add the Then run: Run the install generator to create the PostHog initializer: This will create Update Once installed, you can manually send events to test your integration: Update With When You can also manually capture exceptions that you handle in your application:Install the gems
Requiredposthog-ruby and posthog-rails gems to your Gemfile:Generate the initializer
Requiredconfig/initializers/posthog.rb with sensible defaults and documentation.Configure PostHog
Requiredconfig/initializers/posthog.rb with your project API key and host:Send events
RecommendedConfigure error tracking
Requiredconfig/initializers/posthog.rb to enable automatic exception capture:Automatic exception capture
Recommendedauto_capture_exceptions enabled, exceptions are automatically captured from your controllers:Background jobs
Optionalauto_instrument_active_job is enabled, ActiveJob exceptions are automatically captured:Manually capture exceptions
Optional

