ArgumentError: missing keyword / unknown keyword Ruby / Rails Origin: Application & API Last updated 5 Nov 2026

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

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

Exact message you may see ArgumentError: missing keyword: :nameArgumentError: missing keywords: :a, :bArgumentError: unknown keyword: :nmaeArgumentError (missing keyword: :user)unknown keywords: :foo, :bar
Seen on: Ruby

Meaning

Pass the required keywords (foo(name: "x")), fix typos, and in Ruby 3 convert hashes with **hash. The message names the keyword. For Rails callbacks/factories check the signature after upgrades (e.g. before_action only:).

Common causes

  • Required keyword missing
  • Typo in keyword name
  • Ruby 3: hash passed as last positional argument
  • Method renamed/changed in a gem upgrade
  • Block keyword params

⚡ Quick fix

  1. Pass foo(name: value)
  2. Use foo(**options) for hashes
  3. Check the gem changelog for signature changes

Detailed fix by platform

Ruby

  1. def foo(name:, age: 18); end; foo(name: "A")

How to diagnose

  1. Keyword — Named?
  2. Typo — Spelling?
  3. Hash — ** used?

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

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::Par…ArgumentError: wrong number of arguments (given 1, expected 2) — Ruby: ArgumentError: wrong number of arguments (given 1, expected 2..3) (Ruby / Rails)ArgumentError: wrong …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 fin…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 fi…FactoryBot::DuplicateDefinitionError: Factory already registered — FactoryBot: FactoryBot::DuplicateDefinitionError: Factory already registered: user (Ruby / Rails)FactoryBot::Duplicate…Failed to build gem native extension — Ruby: ERROR: Failed to build gem native extension. current directory: /gems/pg-1.5.4/ext/pg — An error occurred while installing pg (Ruby / Rails)Failed to build gem n…FrozenError: can't modify frozen String — Ruby: FrozenError: can't modify frozen String: "abc" (Ruby / Rails)FrozenError: can't mo…LoadError: cannot load such file — Ruby: LoadError: cannot load such file -- nokogiri (or: cannot load such file -- bundler/setup) (Ruby / Rails)LoadError: cannot loa…ArgumentE…

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.