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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise exception if Active Storage is configured and config.active_storage.service
is not explicitly set
#44372
Conversation
Hmm, based on the failing tests, it might be better if this error is raised when Active Storage is used. Currently this will raise on any Rails app that has Active Storage loaded (which it does by default) but doesn't have the config, even if it never actually uses AS. |
a2c38ff
to
2932bcb
Compare
516c994
to
68c66c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ghousemohamed, we'll get this merged.
@ghousemohamed could you please solve the merge conflicts here? |
@jorgemanrubia I've resolved the merge conflicts |
@ghousemohamed thanks for sorting those out. A last request: could you add an entry to |
@jorgemanrubia Done |
Thanks @ghousemohamed. This is good to merge @jeremy 馃檹 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks @ghousemohamed!
Summary
If
config.active_storage.service
has not been explicitly set in the respective environment's configuration file, then trying to use active storage throws a vague error message, which makes it harder to debug. This was the following error I had gotten:Turned out I had forgotten to explicitly specify
config.active_storage.service
in my configuration file. Specifying it resolved the issue.I had spent a considerable amount of time trying to debug this, and I would have immediately known what the fix was if the error message had been clearer. So, I'm turning in this PR so that anyone facing this in the future will know what to do at a quick glance.
Thanks 馃榿!
Other Information