-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
require 'factory_bot'
fails with latest ActiveSupport gem (7.2.0)
#1685
Labels
Comments
aramprice
changed the title
factory bot fails to load with latest (7.2.0) ActiveSupport
factory bot fails to load with latest ActiveSupport gem (7.2.0)
Aug 12, 2024
aramprice
changed the title
factory bot fails to load with latest ActiveSupport gem (7.2.0)
Aug 12, 2024
require 'factory_bot'
fails with latest ActiveSupport gem (7.2.0)
Earlopain
added a commit
to Earlopain/factory_bot
that referenced
this issue
Aug 13, 2024
In order to use parts of active_support, active_support itself must be required first. https://guides.rubyonrails.org/active_support_core_extensions.html#cherry-picking-a-definition Fixes thoughtbot#1685
Earlopain
added a commit
to Earlopain/factory_bot
that referenced
this issue
Aug 13, 2024
In order to use parts of active_support, active_support itself must be required first. https://guides.rubyonrails.org/active_support_core_extensions.html#cherry-picking-a-definition Fixes thoughtbot#1685
brucebolt
added a commit
to alphagov/link-checker-api
that referenced
this issue
Aug 15, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved.
brucebolt
added a commit
to alphagov/publishing-api
that referenced
this issue
Aug 15, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved.
brucebolt
added a commit
to alphagov/link-checker-api
that referenced
this issue
Aug 15, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved.
KludgeKML
added a commit
to alphagov/locations-api
that referenced
this issue
Aug 21, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved. (Thanks to @brucebolt)
KludgeKML
added a commit
to alphagov/email-alert-api
that referenced
this issue
Aug 21, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved. (Thanks to @brucebolt)
KludgeKML
added a commit
to alphagov/email-alert-api
that referenced
this issue
Aug 27, 2024
As per rails/rails#52582, one must `require active_support` before requiring any other definition(s) like `active_support/core_ext/module/delegation`, which is included by `factory_bot_rails`. Therefore requiring `active_support` here, until thoughtbot/factory_bot#1685 is resolved. (Thanks to @brucebolt)
deepakkumarnd
added a commit
to openvitae-tech/blackboard-lms
that referenced
this issue
Oct 17, 2024
On updating rails the tests failed due to an issue with factory_bot. This is fixed by updating factory_bot_rails thoughtbot/factory_bot#1685
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Per rails/rails#52582 one must
require "active_support"
before requiring any other definition(s) likeactive_support/core_ext/module/delegation
.Seems like the fix would be to add
require "active_supoet"
just before line 2 of lib/factory_bot.rbDescription
Reproduction Steps
Create
foo.rb
with the following contents:Then invoke the file with ruby
Expected behavior
Should behave the same as with earlier versions of ActiveSupport:
Actual behavior
System configuration
factory_bot version:
factory_bot (6.4.6)
rails version: n/a
activesupport (7.2.0)
ruby version:
ruby-3.2.5
The text was updated successfully, but these errors were encountered: