Skip to content

Commit

Permalink
Merge pull request #34557 from sergioisidoro/sergio-patch-load-error
Browse files Browse the repository at this point in the history
Patch load error in case GemSpecError
  • Loading branch information
rafaelfranca committed Nov 28, 2018
2 parents aaacfd9 + a1a08ac commit 9c6e362
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -174,12 +174,12 @@ def spec(config)
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

Expand Down

0 comments on commit 9c6e362

Please sign in to comment.