ActionController::ParameterMissing: param is missing or the value is empty Ruby / Rails Origin: Application & API OSI layer 7 · Application Last updated 5 Nov 2026

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.

Exact message you may see ActionController::ParameterMissing: param is missing or the value is empty: userparam is missing or the value is empty: postActionController::ParameterMissing (param is missing or the value is empty: user)ParameterMissing param is missingparam is missing or the value is empty or invalid
Seen on: Ruby

Meaning

The form/JSON body doesn't wrap fields under user. Check field names (user[name]), Content-Type (application/json), wrap_parameters, and that the request body isn't empty. For APIs, send {"user": {...}} or rely on wrap_parameters format: [:json].

Common causes

  • Form fields not nested under the model key
  • Empty/missing JSON body or wrong Content-Type
  • wrap_parameters disabled
  • Client sending user as blank string
  • Wrong param key in require

⚡ Quick fix

  1. Send user[name]=... or JSON { "user": { "name": "A" } }
  2. Set Content-Type: application/json
  3. Check rails routes and params in logs

Detailed fix by platform

Rails

  1. curl -X POST -H "Content-Type: application/json" -d '{"user":{"name":"A"}}' http://localhost:3000/users

How to diagnose

  1. Key — Present?
  2. Content-Type — JSON?
  3. Wrap — wrap_parameters?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

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::D…ActionController::UnknownFormat — Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant (Ruby / Rails)ActionController::Unk…ActiveModel::ForbiddenAttributesError (strong parameters) — Rails: ActiveModel::ForbiddenAttributesError (Ruby / Rails)ActiveModel::Forbidde…ActiveRecord::AssociationTypeMismatch — Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678) (Ruby / Rails)ActiveRecord::Associa…ActiveRecord::ConnectionNotEstablished — Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found (Ruby / Rails)ActiveRecord::Connect…ActiveRecord::Deadlocked: PG::TRDeadlockDetected — Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected (Ruby / Rails)ActiveRecord::Deadloc…ActiveRecord::IrreversibleMigration — Rails: ActiveRecord::IrreversibleMigration — This migration uses remove_column without a type; db:rollback can't reverse it (Ruby / Rails)ActiveRecord::Irrever…ActiveRecord::RecordInvalid: Validation failed — Rails: ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Name is too short (Ruby / Rails)ActiveRecord::RecordI…ActionCon…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.