solidus_graphql_api icon indicating copy to clipboard operation
solidus_graphql_api copied to clipboard

Add eager_load_paths instead of autoload_paths

Open torukMnk opened this issue 4 years ago • 1 comments

Issue due uninitialized constant https://github.com/solidusio-contrib/solidus_graphql_api/issues/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

torukMnk avatar Jan 09 '22 04:01 torukMnk

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[bot] avatar Apr 16 '22 01:04 stale[bot]