---
title: "Discussion on \"FactoryBot: Factory not registered (KeyError)\" | Hashnode"
description: "Discussion on \"FactoryBot: Factory not registered (KeyError)\". Error\nFactory not registered: \"your_factory_name\" (KeyError)\nlib/active_support/hash_with_indifferent_access.rb:192:in `fetch': key not found: \"your_factory_name\" (KeyError)\n\n\n\nContext\nThis error typically happens in the Rails console when you're usi..."
url: "https://hashnode.com/posts/factorybot-factory-not-registered-keyerror/67eae2a127c91e6389569b0a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [FactoryBot: Factory not registered (KeyError)](https://blog.alexandrecalaca.com/factorybot-factory-not-registered-keyerror?utm_source=hashnode&utm_medium=feed)

Error Factory not registered: "your\_factory\_name" (KeyError) lib/active\_support/hash\_with\_indifferent\_access.rb:192:in \`fetch': key not found: "your\_factory\_name" (KeyError) Context This error typically happens in the Rails console when you're usi...

Mar 31, 2025 · 2 min read · blog.alexandrecalaca.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#alexandrecalaca](https://hashnode.com/tag/alexandrecalaca)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Alexandre Calaça](https://hashnode.com/@alexandrecalaca)

@alexandrecalaca

  
[View profile](https://hashnode.com/@alexandrecalaca)

I'm a passionate software developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
