aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorsergioisidoro <smaisidoro@gmail.com>2018-11-28 16:57:32 +0200
committersergioisidoro <smaisidoro@gmail.com>2018-11-28 16:57:32 +0200
commita1a08ac7ca4bf6f0565d5b0f2109a854895abe28 (patch)
tree0f728a32d724d6cf3d457e1d72c2c3d0ee28ac0a /activerecord
parent3081a54ee39ebc837799eb2d35d879a8de248926 (diff)
downloadrails-a1a08ac7ca4bf6f0565d5b0f2109a854895abe28.tar.gz
rails-a1a08ac7ca4bf6f0565d5b0f2109a854895abe28.tar.bz2
rails-a1a08ac7ca4bf6f0565d5b0f2109a854895abe28.zip
Patch load error in case GemSpecError
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/connection_specification.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
index 2e7a78215a..f60d8469cc 100644
--- a/activerecord/lib/active_record/connection_adapters/connection_specification.rb
+++ b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
@@ -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