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

Warnings are displayed when factory bot is used with Ruby 3.3.0 #1641

Open
robinborst95 opened this issue May 8, 2024 · 0 comments
Open
Labels

Comments

@robinborst95
Copy link

Description

Running code that uses the factory bot gem with Ruby 3.3.0 causes the following warnings to be shown:

warning: /opt/hostedtoolcache/Ruby/3.3.1/x64/lib/ruby/3.3.0/observer.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec. Also contact author of factory_bot-6.2.1 to add observer into its gemspec.

This is a deprecation warning that has been added to Ruby 3.3.0 and which will cause factory bot to fail if run with Ruby 3.4. See
https://rubyreferences.github.io/rubychanges/3.3.html#gems-that-are-warned-to-become-bundled-in-the-next-version

Reproduction Steps

Run any code that uses this gem with Ruby 3.3.0 and you'll get this warning.

Expected behavior

This gem defines observer as a dependency in its gemspec.

Actual behavior

observer is not yet defined in its gemspec.

System configuration

factory_bot version: 6.2.1
ruby version: 3.3.0

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

1 participant