mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #34557 from sergioisidoro/sergio-patch-load-error
Patch load error in case GemSpecError
This commit is contained in:
commit
9c6e362a63
1 changed files with 2 additions and 2 deletions
|
@ -174,12 +174,12 @@ module ActiveRecord
|
|||
if e.path == path_to_adapter
|
||||
# We can assume that a non-builtin adapter was specified, so it's
|
||||
# either misspelled or missing from Gemfile.
|
||||
raise e.class, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
|
||||
raise LoadError, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
|
||||
|
||||
# Bubbled up from the adapter require. Prefix the exception message
|
||||
# with some guidance about how to address it and reraise.
|
||||
else
|
||||
raise e.class, "Error loading the '#{spec[:adapter]}' Active Record adapter. Missing a gem it depends on? #{e.message}", e.backtrace
|
||||
raise LoadError, "Error loading the '#{spec[:adapter]}' Active Record adapter. Missing a gem it depends on? #{e.message}", e.backtrace
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue