Sentry-ruby: `sentry-rails` depends on `rails > 5` and so breaks custom/minimal Rails `Gemfile`

Created on 2 Feb 2021  路  1Comment  路  Source: getsentry/sentry-ruby

Describe the bug

The sentry-rails gem depends on Rails and so brings in all of the Rails gems, even if the host project's Gemfile only requires a minimal set of gems

To Reproduce

Run bundle install using a Gemfile like so:

gem "activerecord", "~> 6.1.1"
gem "actionmailer", "~> 6.1.1"
gem "actionpack", "~> 6.1.1"

gem "sentry-ruby"
gem "sentry-rails"

Expected behavior

Only activerecord,actionmailer, and actionpack are installed from Rails

Actual behavior

All Rails gems are brought in

Environment

  • Ruby Version: 2.7.2
  • SDK Version:

    • sentry-ruby (4.1.5)

  • Integration Versions (if any):

    • sentry-rails (4.1.7)

I think the sentry-rails gem should warn and fail gracefully when the parts of Rails it needs are missing, but not actually require Rails itself.

question wontfix

>All comments

I think the sentry-rails gem should warn and fail gracefully when the parts of Rails it needs are missing, but not actually require Rails itself.

I disagree with this. since the gem is called sentry-rails, it makes sense to specify rails as a dependency. manually checking each component's presence would increase the maintenance effort significantly. I understand the use case of minimal Rails apps, but we don't have the resource to break the support down to individual components' level.

Was this page helpful?
0 / 5 - 0 ratings