'Viewing Rails Credentials in WSL2
I'm following a guide which uses rails credentials but I can't edit the unencrypted file.
I first run EDITOR="code --wait" bin/rails credentials:edit --environment=development which creates development.key & development.yml.enc. However it fails to open up the unencrypted version of the file it showed in the guide.
I have tried EDITOR="code --wait" bin/rails credentials:show --environment=development which shows the file in the terminal with the expected AWS placeholder key and secret. It also provides a number of warnings. But I can't edit.
Are there any other methods to access Rails' unencrypted credentials from a WSL2 environment? I am presuming WSL2 is the cause of the issue...
Solution 1:[1]
Using NANO editor instead seems to work.
EDITOR="nano" bin/rails credentials:edit --environment=development
I'll leave the question up for anyone else with this issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Christian |
