Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about logger and ostruct in Ruby v3.3.5 #1165

Open
tmimura39 opened this issue Sep 5, 2024 · 1 comment
Open

Warning about logger and ostruct in Ruby v3.3.5 #1165

tmimura39 opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels

Comments

@tmimura39
Copy link

Ruby v3.3.5 was recently released.
https://www.ruby-lang.org/en/news/2024/09/03/3-3-5-released/

Warning occurs when loading Rollbar Gem in Ruby v3.3.5

root@6533553801ce:/# cat Gemfile
source "https://rubygems.org"

gem "rollbar"

root@6533553801ce:/# cat main.rb
require "rollbar"

p "RUBY_VERSION #{RUBY_VERSION}"
p "Rollbar::VERSION #{Rollbar::VERSION}"

root@6533553801ce:/# bundle exec ruby main.rb
/usr/local/bundle/gems/rollbar-3.6.0/lib/rollbar.rb:16: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
/usr/local/lib/ruby/3.3.0/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
"RUBY_VERSION 3.3.5"
"Rollbar::VERSION 3.6.0"

This warning appears to be in preparation for Ruby v3.5
ruby/ruby#10428
ruby/ruby@d7e558e

You need to add the gem (logger, ostruct) to the rollbar gem's dependencies or stop using the gem in question.

Workaround

Just add them to the Gemfile of each application, as indicated by the warning message

source "https://rubygems.org"

gem "rollbar"
gem "logger"
gem "ostruct"
Copy link

linear bot commented Sep 5, 2024

@zdavis-rollbar zdavis-rollbar added the Ruby label Sep 5, 2024 — with Linear
@waltjones waltjones self-assigned this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants