class ActiveRecord::NoDatabaseError 
        
        Raised when a given database does not exist.
Inherits From
Public class methods
Source code GitHub
# File activerecord/lib/active_record/errors.rb, line 339
      def db_error(db_name)
        NoDatabaseError.new(<<~MSG)
          Database not found: #{db_name}. Available database configurations can be found in config/database.yml.
          To resolve this error:
          - Create the database by running:
              bin/rails db:create
          - Verify that config/database.yml contains the correct database name.
        MSG
      end
            Source code GitHub
# File activerecord/lib/active_record/errors.rb, line 334
def initialize(message = nil, connection_pool: nil)
  super(message || "Database not found", connection_pool: connection_pool)
end