Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@masutaka
Copy link
Owner

The test failure occured in #49 test:

πŸ”— https://github.com/masutaka/compare_linker/actions/runs/10349442581/job/28644229198

An error occurred while loading ./spec/lib/compare_linker/formatter/markdown_spec.rb.
Failure/Error: require 'factory_bot'

NameError:
uninitialized constant #Class:ActiveSupport::Delegation::Inflector
# ./vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.0/lib/active_support/delegation.rb:47:in `generate'
# ./vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.0/lib/active_support/core_ext/module/delegation.rb:161:in `delegate'
# ./vendor/bundle/ruby/3.3.0/gems/factory_bot-6.4.6/lib/factory_bot/definition_hierarchy.rb:3:in `class:DefinitionHierarchy'
# ./vendor/bundle/ruby/3.3.0/gems/factory_bot-6.4.6/lib/factory_bot/definition_hierarchy.rb:2:in `module:FactoryBot'
# ./vendor/bundle/ruby/3.3.0/gems/factory_bot-6.4.6/lib/factory_bot/definition_hierarchy.rb:1:in `<top (required)>'
# ./vendor/bundle/ruby/3.3.0/gems/factory_bot-6.4.6/lib/factory_bot.rb:8:in `<top (required)>'
# ./spec/spec_helper.rb:2:in `<top (required)>'
# ./spec/lib/compare_linker/formatter/markdown_spec.rb:1:in `<top (required)>'

But it does not reproduce in the local environment.

@masutaka masutaka self-assigned this Aug 12, 2024
@masutaka
Copy link
Owner Author

But it does not reproduce in the local environment.

After deleting Gemfile.lock, the problem was reproduced in the local environment.

@masutaka masutaka changed the title Fix uninitialized constant Research "uninitialized constant #Class:ActiveSupport::Delegation::Inflector" in GitHub Actions Aug 12, 2024
@masutaka masutaka changed the title Research "uninitialized constant #Class:ActiveSupport::Delegation::Inflector" in GitHub Actions Fix "uninitialized constant #Class:ActiveSupport::Delegation::Inflector" in GitHub Actions Aug 12, 2024
spec.add_dependency "httpclient"
spec.add_dependency "octokit"

spec.add_development_dependency "activesupport", ">= 5.0.0", "< 7.2.0" # temporary pinned. See https://github.com/masutaka/compare_linker/pull/50
Copy link
Owner Author

@masutaka masutaka Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced in activesupport v7.2.0 and not in v7.1.3.4.

See also https://github.com/thoughtbot/factory_bot/blob/v6.4.6/factory_bot.gemspec#L29

@masutaka masutaka changed the title Fix "uninitialized constant #Class:ActiveSupport::Delegation::Inflector" in GitHub Actions Add workaround to factory_bot and activesupport dependencies Aug 12, 2024
@masutaka masutaka marked this pull request as ready for review August 12, 2024 10:20
@masutaka masutaka merged commit a46a0c4 into main Aug 12, 2024
@masutaka masutaka deleted the fix-uninitialized-constant branch August 12, 2024 10:20
masutaka added a commit that referenced this pull request Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants