Skip to main content

Update Rails 7 Credentials

Published 1 min readMarkdown
Update Rails 7 Credentials

Photo by Towfiqu barbhuiya on Unsplash

Update Credentials of Current Environment

To edit Rails 7 credentials in the preferred editor, run:

EDITOR= rails credentials:edit

Replace <editor> with editor name.

For example:

# nano
EDITOR=nano rails credentials:edit

# mate
EDITOR="mate --wait" rails credentials:edit

Update Credentials of Other Environment

To edit production’s credentials, run:

EDITOR=nano rails credentials:edit --environment

Replace <env_name>with needed environment name.

For example:

# production:
EDITOR=nano rails credentials:edit --environment production

# staging
EDITOR=nano rails credentials:edit --environment staging

No comments yet. Be the first to comment.

More from this blog