forked from rails/rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate errors when loading adapter gem fails into
LoadError
If not using Bundler and the specified adapter gem does not exist, `rubygems` raises `Gem::MissingSpecError`. `Gem::MissingSpecError` inherits `LoadError`, but the argument of `initialize` is different. https://github.com/rubygems/rubygems/blob/9054079ce8a1ad05dd206a3562339b74712c7fc6/lib/rubygems/errors.rb#L27..L31 As a result, `ArugmentError` occurs when re-raising the exception. Although it is possible to check the error class and specify appropriate arguments for each of them, I think that it is sufficient to just raise `LoadError`. Together, when using Bundler, fixed that gem which error occurred could not be checked correctly. Fixes rails#32830.
- Loading branch information
Showing
3 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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