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

[v3.1] Only default to activestorage adapter if Rails version is supported #4565

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 5, 2022

Same as #4563 but for v3.1

We only support the activestorage adapter with Rails 6.1 and above,
but we default to it, even if the Rails version is 6.0 and below.
Since we still support Rails 5.2 and 6.0, we cannot default to
the active storage adapter. The app won't boot unless we also
change the adapter in the spree initializer.

If the initializer, though, is nested in a `config.to_prepare` hook
(as recommended from Rails new autoloader zeitwerk [1]) the app
refuses to start anyhow, because the config is then taken from
the `app_configuration` defaults.

[1](https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#use-case-1-during-boot-load-reloadable-code)
@tvdeyen tvdeyen force-pushed the v3.1-active-storage-rails-6.1 branch from 8bc3e24 to fc8757c Compare September 5, 2022 09:59
@tvdeyen tvdeyen merged commit 566c931 into solidusio:v3.1 Sep 5, 2022
@tvdeyen tvdeyen deleted the v3.1-active-storage-rails-6.1 branch September 5, 2022 11:44
@waiting-for-dev waiting-for-dev added the type:bug Error, flaw or fault label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants