0

My rails environment runs from a Docker. Previously using a Docker ruby:2.7.5 (when I created th project credential, but I think it doesn't matter), and currently using ruby:3.2.2.

Suddenly, when I try to edit the credentials (from host or from the container), the command go direct to outcome "File encrypted and saved.", without open the file (and decrypt).

running: rails credentials:show, I can see the file contents with no problem.

I've already given all rights to the files, delete and recreate the credentials file (together with the master.key file).

I have no clue what I should try to edit this file. Any idea? thoughts?

1 Answers1

0

First, verify if the docker image has an editor program. Attach to the docker container and type in your preferred text editor (vi, vim, nano, emac).

If there is no editor installed, you may need to add it to the container via the package manager.

Once you verify or install your preferred editor program, run the following command (assumes you are using vi, but swap in your editor of choice).

EDITOR='vi' rails credentials:edit

Joe Thor
  • 1,164
  • 1
  • 11
  • 19