From a14464e85931e64cf7ad026b1bb8ebe5ca467955 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Thu, 15 Jan 2026 08:15:31 +0000 Subject: [PATCH] fix: add explicit dependency on logger for Ruby 4 Ruby 4.0 moved "logger" from being a default gem to a bundled one (see https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates and https://stdgems.org/logger/) so it now needs to be added as an explicit dependency. Without this, it will raise the following warning: warning: logger used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0. You can add logger to your Gemfile or gemspec to fix this error. --- CHANGELOG.md | 6 ++++++ sentry-ruby/sentry-ruby.gemspec | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62448291a..eeec8f149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## Unreleased + +### Bug Fixes + +- Add explicit dependency on logger gem to fix Ruby 4.0 warning ([#2837](https://github.com/getsentry/sentry-ruby/pull/2837)) + ## 6.3.0 ### Features diff --git a/sentry-ruby/sentry-ruby.gemspec b/sentry-ruby/sentry-ruby.gemspec index e7346b7f1..5834b8e29 100644 --- a/sentry-ruby/sentry-ruby.gemspec +++ b/sentry-ruby/sentry-ruby.gemspec @@ -30,4 +30,5 @@ Gem::Specification.new do |spec| spec.add_dependency "concurrent-ruby", "~> 1.0", ">= 1.0.2" spec.add_dependency "bigdecimal" + spec.add_dependency "logger" end