Error map

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

Ruby / Rails · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). 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.

ActiveRecord::RecordInvalid: Validation failed — Rails: ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Name is too short (Ruby / Rails)ActiveRecor…ActiveRecord::RecordNotFound: Couldn't find X with 'id'= — Rails: ActiveRecord::RecordNotFound: Couldn't find User with 'id'=42 (Ruby / Rails)ActiveRecord::Recor…FactoryBot::DuplicateDefinitionError: Factory already registered — FactoryBot: FactoryBot::DuplicateDefinitionError: Factory already registered: user (Ruby / Rails)FactoryBot::Duplica…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…ActiveRecord::ConnectionNotEstablished — Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found (Ruby / Rails)ActiveRecord::Conne…ActiveRecord::Deadlocked: PG::TRDeadlockDetected — Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected (Ruby / Rails)ActiveRecord::Deadl…ActiveModel::ForbiddenAttributesError (strong parameters) — Rails: ActiveModel::ForbiddenAttributesError (Ruby / Rails)ActiveModel::Forbid…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::ReadOnlyRecord — Rails: ActiveRecord::ReadOnlyRecord: Order is marked as readonly (Ruby / Rails)ActiveRecord::ReadO…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…RSpec::Expectations::ExpectationNotMetError: expected X got Y — RSpec: expected: 200 got: 404 (compared using ==) — RSpec::Expectations::ExpectationNotMetError (Ruby / Rails)RSpec::Expectations…ActiveRecord::AssociationTypeMismatch — Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678) (Ruby / Rails)ActiveRecord::Assoc…undefined method for nil — Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass) (Ruby / Rails)undefined method fo…ActionController::RoutingError: No route matches — Rails: ActionController::RoutingError (No route matches [GET] "/users/new") (Ruby / Rails)ActionController::R…ArgumentError: wrong number of arguments (given 1, expected 2) — Ruby: ArgumentError: wrong number of arguments (given 1, expected 2..3) (Ruby / Rails)ArgumentError: wron…ArgumentError: missing keyword / unknown keyword — Ruby: ArgumentError: missing keyword: :name / unknown keyword: :nmae (Ruby / Rails)ArgumentError: miss…TypeError: nil can't be coerced into Integer — Ruby: TypeError: nil can't be coerced into Integer / String can't be coerced into Integer (Ruby / Rails)TypeError: nil can'…1062 — MySQL ERROR 1062 (23000): Duplicate entry for key (MySQL)10621452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)145223505 — PostgreSQL: ERROR: duplicate key value violates unique constraint (PostgreSQL)23505ActionController::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…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…PG::UndefinedTable: relation does not exist — Rails: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "users" does not exist (Ruby / Rails)PG::UndefinedTable:…REMOTE HOST IDENTIFICATION HAS CHANGED — WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (ssh host key changed) (Linux)REMOTE HOST IDENTIF…NO_PUBKEY — The following signatures couldn't be verified because the public key is not available: NO_PUBKEY (Linux)NO_PUBKEYavc: denied — SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions) (Linux)avc: deniedMysql2::Error: Unknown column in field list — Rails: ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'users.nickname' in 'field list' (Ruby / Rails)Mysql2::Error: Unkn…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…ActiveRecord::StaleObjectError (optimistic locking) — Rails: ActiveRecord::StaleObjectError: Attempted to update a stale object: Order (Ruby / Rails)ActiveRecord::Stale…ActionController::UnknownFormat — Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant (Ruby / Rails)ActionController::U…AbstractController::DoubleRenderError — Rails: AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action) (Ruby / Rails)AbstractController:…Bundler: Could not find gem in locally installed gems — Bundler: Could not find gem 'rails (~> 7.1)' in locally installed gems / Could not find rails-7.1.0 in any of the gem sources listed in your Gemfile (Ruby / Rails)Bundler: Could not …Bundler could not find compatible versions for gem — Bundler: Bundler could not find compatible versions for gem "activesupport": In Gemfile: rails (= 7.1.0) depends on activesupport (= 7.1.0) (Ruby / Rails)Bundler could not f…rake aborted! Don't know how to build task — Rake: rake aborted! Don't know how to build task 'db:migrat' (See the list of available tasks with `rake --tasks`) (Ruby / Rails)rake aborted! Don't…ActiveRecord::PendingMigrationError — Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate (Ruby / Rails)ActiveRecord::Pendi…ActionController::UrlGenerationError: No route matches {action...} missing required keys — Rails: ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"users", :id=>nil}, missing required keys: [:id] (Ruby / Rails)ActionController::U…ActionView::MissingTemplate: Missing template — Rails: ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}) (Ruby / Rails)ActionView::Missing…

Directly related (11)

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).

FactoryBot::DuplicateDefinitionError: Factory already registeredRuby / Rails

FactoryBot: FactoryBot::DuplicateDefinitionError: Factory already registered: user

Two factory definitions use the same name (or files are loaded twice).

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.

ActiveRecord::ConnectionNotEstablishedRuby / Rails

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

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

ActiveRecord::Deadlocked: PG::TRDeadlockDetectedRuby / Rails

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

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

ActiveModel::ForbiddenAttributesError (strong parameters)Ruby / Rails

Rails: ActiveModel::ForbiddenAttributesError

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

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::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).

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.

RSpec::Expectations::ExpectationNotMetError: expected X got YRuby / Rails

RSpec: expected: 200 got: 404 (compared using ==) — RSpec::Expectations::ExpectationNotMetError

An RSpec `expect` assertion didn't hold: the actual value differs from what the test expected.

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 (29)

undefined method for nilRuby / Rails

Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass)

You called a method on nil — the object you expected (a record, hash value, param) wasn’t there.

ActionController::RoutingError: No route matchesRuby / Rails

Rails: ActionController::RoutingError (No route matches [GET] "/users/new")

The request path/method doesn't match any route in `config/routes.rb` (a 404 in production).

ArgumentError: wrong number of arguments (given 1, expected 2)Ruby / Rails

Ruby: ArgumentError: wrong number of arguments (given 1, expected 2..3)

A method was called with more or fewer arguments than it accepts.

ArgumentError: missing keyword / unknown keywordRuby / Rails

Ruby: ArgumentError: missing keyword: :name / unknown keyword: :nmae

A method requiring keyword arguments was called without them, or with a misspelt keyword.

TypeError: nil can't be coerced into IntegerRuby / Rails

Ruby: TypeError: nil can't be coerced into Integer / String can't be coerced into Integer

Arithmetic combined a number with `nil` (or a String) which Ruby can't convert automatically.

1062MySQL

MySQL ERROR 1062 (23000): Duplicate entry for key

An INSERT/UPDATE would create a duplicate value in a PRIMARY or UNIQUE key.

1452MySQL

MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.

23505PostgreSQL

PostgreSQL: ERROR: duplicate key value violates unique constraint

An INSERT/UPDATE would create a duplicate in a UNIQUE or PRIMARY KEY column — or the id sequence is behind the existing data.

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.

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.

PG::UndefinedTable: relation does not existRuby / Rails

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

Rails queried a table that isn't in the connected PostgreSQL database.

REMOTE HOST IDENTIFICATION HAS CHANGEDLinux

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (ssh host key changed)

The server’s SSH host key differs from the one saved in ~/.ssh/known_hosts — usually because the server was rebuilt or the IP was…

NO_PUBKEYLinux

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY

apt can’t verify a repository’s signature because the repo’s signing key isn’t installed (or has expired/rotated).

avc: deniedLinux

SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions)

SELinux blocked the access — file permissions look fine, but the file’s security context or a boolean doesn’t allow the service t…

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).

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.

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.

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.).

AbstractController::DoubleRenderErrorRuby / Rails

Rails: AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action)

An action called `render`/`redirect_to` more than once.

Bundler: Could not find gem in locally installed gemsRuby / Rails

Bundler: Could not find gem 'rails (~> 7.1)' in locally installed gems / Could not find rails-7.1.0 in any of the gem sources listed in your Gemfile

A gem from the Gemfile/Gemfile.lock isn't installed (or isn't available at that version).

Bundler could not find compatible versions for gemRuby / Rails

Bundler: Bundler could not find compatible versions for gem "activesupport": In Gemfile: rails (= 7.1.0) depends on activesupport (= 7.1.0)

Two gems in your Gemfile require incompatible versions of a shared dependency.

rake aborted! Don't know how to build taskRuby / Rails

Rake: rake aborted! Don't know how to build task 'db:migrat' (See the list of available tasks with `rake --tasks`)

Rake doesn't know the task name — a typo, a missing Rakefile, or a gem/engine not loaded.

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.

ActionController::UrlGenerationError: No route matches {action...} missing required keysRuby / Rails

Rails: ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"users", :id=>nil}, missing required keys: [:id]

A URL helper (`user_path(@user)`) was called without a value Rails needs (usually `nil` object).

ActionView::MissingTemplate: Missing templateRuby / Rails

Rails: ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]})

The action tried to render a view that doesn't exist for the requested format/handler.