You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseAdapterNotFound,"database configuration specifies nonexistent '#{adapter_name}' adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile."
Available adapters are: #{@adapters.keys.sort.join(", ")}.
35
+
Ensure that the adapter is spelled correctly in config/database.yml or that you've added the necessary
36
+
adapter gem to your Gemfile if it's not in the list of available adapters.
37
+
MSG
32
38
end
33
39
34
40
unlessObject.const_defined?(class_name)
35
41
begin
36
42
requirepath_to_adapter
37
43
rescueLoadError=>error
38
-
# We couldn't require the adapter itself. Raise an exception that
39
-
# points out config typos and missing gems.
44
+
# We couldn't require the adapter itself.
40
45
iferror.path == path_to_adapter
41
-
# We can assume that a non-builtin adapter was specified, so it's
42
-
# either misspelled or missing from Gemfile.
43
-
raiseLoadError,"Error loading the '#{adapter_name}' Active Record adapter. Ensure that the necessary adapter gem is in the Gemfile. #{error.message}",error.backtrace
44
-
46
+
# We can assume here that a non-builtin adapter was specified and the path
47
+
# registered by the adapter gem is incorrect.
48
+
raiseLoadError,"Error loading the '#{adapter_name}' Active Record adapter. Ensure that the path registered by the adapter gem is correct. #{error.message}",error.backtrace
49
+
else
45
50
# Bubbled up from the adapter require. Prefix the exception message
46
51
# with some guidance about how to address it and reraise.
47
-
else
48
52
raiseLoadError,"Error loading the '#{adapter_name}' Active Record adapter. Missing a gem it depends on? #{error.message}",error.backtrace
assert_match"database configuration specifies nonexistent 'ridiculous' adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.",error.message
19
+
assert_match"Database configuration specifies nonexistent 'ridiculous' adapter. Available adapters are: abstract, fake, mysql2, postgresql, sqlite3, trilogy. Ensure that the adapter is spelled correctly in config/database.yml or that you've added the necessary adapter gem to your Gemfile if it's not in the list of available adapters.",error.message
20
20
end
21
21
22
22
# The abstract adapter is used simply to bypass the bit of code that
0 commit comments