Skip to content

Sentry doesn't seem to be recording errors when started via Rails runner #325

@nfm

Description

@nfm

It seems like Sentry doesn't record exceptions for some reason when running code via Rails runner. I've put together a minimal example Rails app to reproduce the issue: https://github.com/nfm/raven_rails_runner_bug

Basically, running any code via Rails runner that causes an exception (eg. ./bin/rails runner '1 / 0') isn't then capturing the exception for me. This happens in production, where other kinds of exceptions are being recorded correctly (from the webserver, but also from rake tasks and delayed jobs). It also happens in development if I configure Raven's environments to include development.

The example repo should be pretty straightforward but if not let me know, I'm happy to clarify what's going wrong however I can. Cheers :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions