diff --git a/sentry-delayed_job/spec/spec_helper.rb b/sentry-delayed_job/spec/spec_helper.rb index 3e07723bb..d64c98b9d 100644 --- a/sentry-delayed_job/spec/spec_helper.rb +++ b/sentry-delayed_job/spec/spec_helper.rb @@ -5,6 +5,9 @@ require "debug/prelude" rescue LoadError end + +require "logger" + require "active_record" require "delayed_job" require "delayed_job_active_record" diff --git a/sentry-opentelemetry/Gemfile b/sentry-opentelemetry/Gemfile index b30d36d42..981c911e2 100644 --- a/sentry-opentelemetry/Gemfile +++ b/sentry-opentelemetry/Gemfile @@ -6,6 +6,8 @@ git_source(:github) { |name| "https://github.com/#{name}.git" } # Specify your gem's dependencies in sentry-ruby.gemspec gemspec +gem "ostruct" if RUBY_VERSION >= "3.4" + gem "opentelemetry-sdk" gem "opentelemetry-instrumentation-rails" diff --git a/sentry-rails/spec/isolated/active_job_activation.rb b/sentry-rails/spec/isolated/active_job_activation.rb index e8c8cb571..82483e008 100644 --- a/sentry-rails/spec/isolated/active_job_activation.rb +++ b/sentry-rails/spec/isolated/active_job_activation.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +# Fixing crash: +# activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in +# . `': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) +require "logger" + # for https://github.com/getsentry/sentry-ruby/issues/1249 require "active_job/railtie" # Rails 7.2 added HealthCheckController, which requires ActionController diff --git a/sentry-resque/Gemfile b/sentry-resque/Gemfile index 5819261e7..d16f450b9 100644 --- a/sentry-resque/Gemfile +++ b/sentry-resque/Gemfile @@ -5,6 +5,9 @@ git_source(:github) { |name| "https://github.com/#{name}.git" } # Specify your gem's dependencies in sentry-ruby.gemspec gemspec + +gem "ostruct" if RUBY_VERSION >= "3.4" + gem "sentry-ruby", path: "../sentry-ruby" gem "resque-retry", "~> 1.8" diff --git a/sentry-ruby/Gemfile b/sentry-ruby/Gemfile index 5371ddbf2..fb2b5cc51 100644 --- a/sentry-ruby/Gemfile +++ b/sentry-ruby/Gemfile @@ -9,6 +9,8 @@ rack_version = ENV["RACK_VERSION"] rack_version = "3.0.0" if rack_version.nil? gem "rack", "~> #{Gem::Version.new(rack_version)}" unless rack_version == "0" +gem "ostruct" if RUBY_VERSION >= "3.4" + redis_rb_version = ENV.fetch("REDIS_RB_VERSION", "5.0") gem "redis", "~> #{redis_rb_version}" diff --git a/sentry-sidekiq/spec/sentry/rails_spec.rb b/sentry-sidekiq/spec/sentry/rails_spec.rb index 36c6fdd31..a68133ebb 100644 --- a/sentry-sidekiq/spec/sentry/rails_spec.rb +++ b/sentry-sidekiq/spec/sentry/rails_spec.rb @@ -2,6 +2,8 @@ return unless ENV["WITH_SENTRY_RAILS"] +require "logger" + require "rails" require "sentry-rails" require "spec_helper" diff --git a/sentry-sidekiq/spec/spec_helper.rb b/sentry-sidekiq/spec/spec_helper.rb index e712a6a0f..c8ce24127 100644 --- a/sentry-sidekiq/spec/spec_helper.rb +++ b/sentry-sidekiq/spec/spec_helper.rb @@ -22,6 +22,11 @@ require "sentry-ruby" +# Fixing crash: +# activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in +# . `': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) +require "logger" + require 'simplecov' SimpleCov.start do