# Missing \`secret\_key\_base\` for 'production' environment

**URL:** <https://www.ruby-forum.com/t/missing-secret-key-base-for-production-environment/266848>\
**Category:** Deployment\
**Created:** [January 16, 2025, 1:01pm UTC](https://www.ruby-forum.com/t/missing-secret-key-base-for-production-environment/266848 "2025-01-16T13:01:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luc-Antoine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@Luc-Antoine](https://www.ruby-forum.com/u/Luc-Antoine)\
**Post date:** [January 16, 2025, 1:01pm UTC](https://www.ruby-forum.com/t/missing-secret-key-base-for-production-environment/266848/1 "2025-01-16T13:01:43Z")

</div>

Hello,

I try to deploy my application on a server.

My config:  
Debian 12 on the server  
Ruby 3.2.2  
Rails 7.0.8.7

However, I get this error:  
Missing `secret_key_base` for ‘production’ environment

I don’t understand why, because I execute this:  
`EDITOR=sed rails credentials:edit --environment production`

But the error is always here.

I read on the log that /config/credentials/production.key is not in git.  
It is a good thing, or not ?

Thank you for your help!
