class method self.db_error

Ruby on Rails 8.1.2

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.db_error(db_name)

No documentation comment.

Parameters

db_name req
Source
# File activerecord/lib/active_record/errors.rb, line 347
      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

Defined in activerecord/lib/active_record/errors.rb line 347 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::NoDatabaseError

Type at least 2 characters to search.

↑↓ navigate · open · esc close