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

Add eager_load_paths instead of autoload_paths #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

torukMnk
Copy link

@torukMnk torukMnk commented Jan 9, 2022

Issue due uninitialized constant #198 On Rails > 5 versions.

One way to fix it is to add this to your Rails.application.configure environment file

 config.enable_dependency_loading = true

but it seems the gem should use eager_load_paths instead of autoload_paths.
https://www.bigbinary.com/blog/rails-5-disables-autoloading-after-booting-the-app-in-production

besides this change I notice an issue with factories directory when use eager_load_paths

 uninitialized constant FactoryBot (NameError)

I wonder why solidus_dev_support wants the factories at lib folder if those files are for testing only
https://github.com/solidusio/solidus_dev_support/blob/master/lib/solidus_dev_support/testing_support/factories.rb

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant