Error map

PG::UndefinedTable: relation does not exist Rails: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "users" does not exist

Ruby / Rails · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

PG::UndefinedTable: relation does not exist — Rails: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "users" does not exist (Ruby / Rails)PG::Undefin…ActiveRecord::PendingMigrationError — Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate (Ruby / Rails)ActiveRecord::Pendi…PG::DuplicateColumn / Duplicate column name (migration) — Rails: ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column "status" of relation "orders" already exists (Ruby / Rails)PG::DuplicateColumn…ActiveRecord::IrreversibleMigration — Rails: ActiveRecord::IrreversibleMigration — This migration uses remove_column without a type; db:rollback can't reverse it (Ruby / Rails)ActiveRecord::Irrev…Mysql2::Error: Unknown column in field list — Rails: ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'users.nickname' in 'field list' (Ruby / Rails)Mysql2::Error: Unkn…ActiveRecord::ConnectionNotEstablished — Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found (Ruby / Rails)ActiveRecord::Conne…PG::ConnectionBad: could not connect to server — Rails: PG::ConnectionBad: could not connect to server: Connection refused. Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? (Ruby / Rails)PG::ConnectionBad: …ActiveRecord::Deadlocked: PG::TRDeadlockDetected — Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected (Ruby / Rails)ActiveRecord::Deadl…ActiveRecord::ReadOnlyRecord — Rails: ActiveRecord::ReadOnlyRecord: Order is marked as readonly (Ruby / Rails)ActiveRecord::ReadO…ActiveRecord::AssociationTypeMismatch — Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678) (Ruby / Rails)ActiveRecord::Assoc…1146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)114642P01 — PostgreSQL: ERROR: relation "x" does not exist (PostgreSQL)42P011022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)10221051 — MySQL ERROR 1051 (42S02): Unknown table 'x' (MySQL)10511060 — MySQL ERROR 1060 (42S21): Duplicate column name 'x' (MySQL)10601061 — MySQL ERROR 1061 (42000): Duplicate key name 'x' (MySQL)10611091 — MySQL ERROR 1091 (42000): Can't DROP 'x'; check that column/key exists (MySQL)109142P07 — ERROR: relation "x" already exists (PostgreSQL)42P0742701 — ERROR: column "x" of relation "y" already exists (PostgreSQL)42701SQLSTATE[42S22]: Column not found — Laravel: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list' (Laravel)SQLSTATE[42S22]: Co…ActionController::InvalidAuthenticityToken — Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity) (Ruby / Rails)ActionController::I…Error: connect ECONNREFUSED 127.0.0.1:6379 — Redis: Error: connect ECONNREFUSED 127.0.0.1:6379 / Could not connect to Redis at 127.0.0.1:6379: Connection refused (Redis)Error: connect ECON…Redis TLS: SSL handshake error / protocol mismatch — Redis: Error: write EPROTO ... SSL routines:ssl3_get_record:wrong version number / Connection reset by peer (TLS vs plaintext) (Redis)Redis TLS: SSL hand…ActiveRecord::RecordNotFound: Couldn't find X with 'id'= — Rails: ActiveRecord::RecordNotFound: Couldn't find User with 'id'=42 (Ruby / Rails)ActiveRecord::Recor…ActiveRecord::RecordInvalid: Validation failed — Rails: ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Name is too short (Ruby / Rails)ActiveRecord::Recor…ActiveRecord::RecordNotUnique: duplicate key value — Rails: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email" (Ruby / Rails)ActiveRecord::Recor…NameError: uninitialized constant — Ruby: NameError: uninitialized constant UsersController::User (Did you mean? Users) (Ruby / Rails)NameError: uninitia…NameError: undefined local variable or method — Ruby: NameError: undefined local variable or method 'x' for main:Object (Ruby / Rails)NameError: undefine…ActiveRecord::StaleObjectError (optimistic locking) — Rails: ActiveRecord::StaleObjectError: Attempted to update a stale object: Order (Ruby / Rails)ActiveRecord::Stale…ActiveModel::ForbiddenAttributesError (strong parameters) — Rails: ActiveModel::ForbiddenAttributesError (Ruby / Rails)ActiveModel::Forbid…ActionController::ParameterMissing: param is missing or the value is empty — Rails: ActionController::ParameterMissing: param is missing or the value is empty: user (Ruby / Rails)ActionController::P…ActionController::UnknownFormat — Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant (Ruby / Rails)ActionController::U…

Directly related (9)

ActiveRecord::PendingMigrationErrorRuby / Rails

Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate

The database schema is behind the migration files in the app.

PG::DuplicateColumn / Duplicate column name (migration)Ruby / Rails

Rails: ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column "status" of relation "orders" already exists

A migration tried to add a column/table/index that already exists.

ActiveRecord::IrreversibleMigrationRuby / Rails

Rails: ActiveRecord::IrreversibleMigration — This migration uses remove_column without a type; db:rollback can't reverse it

`rails db:rollback` can't undo the migration because it contains an operation Rails can't invert.

Mysql2::Error: Unknown column in field listRuby / Rails

Rails: ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'users.nickname' in 'field list'

The query references a column that doesn't exist in the table (missing migration, typo or stale schema cache).

ActiveRecord::ConnectionNotEstablishedRuby / Rails

Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found

ActiveRecord has no database connection configured or established for this process.

PG::ConnectionBad: could not connect to serverRuby / Rails

Rails: PG::ConnectionBad: could not connect to server: Connection refused. Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

Rails can't reach PostgreSQL — the server is down, wrong host/port/socket, or credentials/pg_hba block it.

ActiveRecord::Deadlocked: PG::TRDeadlockDetectedRuby / Rails

Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected

Two transactions locked rows in opposite orders, so PostgreSQL aborted one.

ActiveRecord::ReadOnlyRecordRuby / Rails

Rails: ActiveRecord::ReadOnlyRecord: Order is marked as readonly

You tried to save a record that was loaded as read-only (e.g. via `joins` in old Rails or `readonly` scope).

ActiveRecord::AssociationTypeMismatchRuby / Rails

Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678)

You assigned the wrong kind of object (or an id string) to an association.

Two steps away (22)

1146MySQL

MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist

The query references a table that MySQL can’t find in that database.

42P01PostgreSQL

PostgreSQL: ERROR: relation "x" does not exist

The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.

1022MySQL

MySQL ERROR 1022 (23000): Can't write; duplicate key in table

An ALTER/CREATE produced a duplicate key or constraint name — often a foreign key name that already exists in the database.

1051MySQL

MySQL ERROR 1051 (42S02): Unknown table 'x'

DROP TABLE targeted a table that doesn’t exist.

1060MySQL

MySQL ERROR 1060 (42S21): Duplicate column name 'x'

A CREATE/ALTER adds a column that already exists, or a SELECT in a view/derived table produces two columns with the same name.

1061MySQL

MySQL ERROR 1061 (42000): Duplicate key name 'x'

CREATE INDEX/ADD INDEX used an index name that already exists on the table.

1091MySQL

MySQL ERROR 1091 (42000): Can't DROP 'x'; check that column/key exists

ALTER TABLE tried to drop a column or index that doesn’t exist.

42P07PostgreSQL

ERROR: relation "x" already exists

CREATE TABLE/INDEX/SEQUENCE used a name that already exists in that schema.

42701PostgreSQL

ERROR: column "x" of relation "y" already exists

ALTER TABLE ADD COLUMN for a column that’s already there.

SQLSTATE[42S22]: Column not foundLaravel

Laravel: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'

The SQL refers to a column that doesn't exist in the table — a missing migration, typo or wrong table.

ActionController::InvalidAuthenticityTokenRuby / Rails

Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity)

A non-GET request arrived without a valid CSRF token for the session.

Error: connect ECONNREFUSED 127.0.0.1:6379Redis

Redis: Error: connect ECONNREFUSED 127.0.0.1:6379 / Could not connect to Redis at 127.0.0.1:6379: Connection refused

Nothing is listening on the Redis host/port your client uses.

Redis TLS: SSL handshake error / protocol mismatchRedis

Redis: Error: write EPROTO ... SSL routines:ssl3_get_record:wrong version number / Connection reset by peer (TLS vs plaintext)

The client and server disagree about TLS — plaintext client to a TLS port, or TLS client to a plaintext port.

ActiveRecord::RecordNotFound: Couldn't find X with 'id'=Ruby / Rails

Rails: ActiveRecord::RecordNotFound: Couldn't find User with 'id'=42

`find`/`find_by!` didn't find a row, so Rails raises (and renders a 404 in production).

ActiveRecord::RecordInvalid: Validation failedRuby / Rails

Rails: ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Name is too short

`save!`/`create!`/`update!` raised because validations failed.

ActiveRecord::RecordNotUnique: duplicate key valueRuby / Rails

Rails: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email"

A unique index rejected an insert/update because the value already exists.

NameError: uninitialized constantRuby / Rails

Ruby: NameError: uninitialized constant UsersController::User (Did you mean? Users)

Ruby (or Rails autoloading) couldn't find a class or module with that name in the current scope.

NameError: undefined local variable or methodRuby / Rails

Ruby: NameError: undefined local variable or method 'x' for main:Object

Ruby saw a bare identifier that is neither a local variable nor a method on the current object.

ActiveRecord::StaleObjectError (optimistic locking)Ruby / Rails

Rails: ActiveRecord::StaleObjectError: Attempted to update a stale object: Order

Two users/processes updated the same record; the second save failed the `lock_version` check.

ActiveModel::ForbiddenAttributesError (strong parameters)Ruby / Rails

Rails: ActiveModel::ForbiddenAttributesError

You passed raw `params` to `new/create/update`, but strong parameters require permitting attributes first.

ActionController::ParameterMissing: param is missing or the value is emptyRuby / Rails

Rails: ActionController::ParameterMissing: param is missing or the value is empty: user

`params.require(:user)` found no `user` key (or it was blank), so Rails responds 400.

ActionController::UnknownFormatRuby / Rails

Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant

The controller has no template or `respond_to` handler for the requested format (HTML/JSON/etc.).