Handle when Spring is not installed#40913
Merged
rafaelfranca merged 1 commit intorails:masterfrom Dec 29, 2020
Merged
Conversation
0642f2b to
557f6ee
Compare
eugeneius
reviewed
Dec 27, 2020
Member
There was a problem hiding this comment.
Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.
Suggested change
| rescue Gem::MissingSpecError | |
| rescue Gem::LoadError |
Member
Author
There was a problem hiding this comment.
I've changed it to Gem::LoadError, but I'm not 100% sure that is more suitable. I think the documentation is generally good advice, but, since we are swallowing the error, being more specific might be better. On the other hand, Gem::ConflictError is currently the only other subclass of Gem::LoadError, and the !defined?(Spring) guard should prevent us from causing / swallowing such an error, so perhaps it doesn't matter.
Spring is not in the default `:test` gem group, and may not be installed in some testing environments, such as CI. Fixes rails#40911.
557f6ee to
2a4fa7e
Compare
rafaelfranca
added a commit
that referenced
this pull request
Dec 29, 2020
…lled Handle when Spring is not installed
jcoyne
added a commit
to sul-dlss-deprecated/happy-heron
that referenced
this pull request
Feb 2, 2021
i.e. in production. This allows us to do `bin/rails c -e p` on the servers again See: rails/rails#40913
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spring is not in the default
:testgem group, and may not be installed in some testing environments, such as CI.Fixes #40911.