rails: rails credentials:edit doesn't work
Steps to reproduce
Run the command in CLI:
EDITOR=st rails credentials:edit
Expected behavior
Expect to see an editor open up with unencrypted content of the credentials.yml.enc
.
Actual behavior
The following output is generated in the CLI:
New credentials encrypted and saved.
System configuration
5.2 2.3.3
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 15 (4 by maintainers)
Guys, don’t know if someone is facing this kind of error… but basically this was what I did and worked perfectly!
on terminal, run (for
Sublime Text 3
):then run:
🎉
thanks to martinbuberl for the config on sublime
Thank You Vladimir-19, That solved a problem I was having too.
I just had the same problem. This is how i solved it (working with VSCode on Catalina):
EDITOR="code --wait" rails credentials:edit
(orEDITOR="subl --w" bin/rails credentials:edit
) in your app terminal. It should create new credentials.yml.enc and master.key. At the same time this command should open credentials file in edit format.In mac, the credentials file opening with vim editor.
The silent exit and
New credentials encrypted and saved.
can be reproduced on any app if starting the editor throws any kind of error. The simplest might be setting EDITOR to something that obviously doesn’t work.Make sure to pass in a wait flag that
st
supports, likelyEDITOR="st --wait"
. Seecredentials:help
for more.