When I created a public clone of a customer and revenue app created with Rails that I run at work, I was addicted to the title, so I will leave it as a memo.
.git file and change the app name (folder name) to _v2git init and push to remote repositorycredentials.yml to enter the RDS information (at this time, I used the credentials: edit command once, and for some reason I used the credential file once. I'm following the mysterious procedure of removing and recreating with the credeitials: edit command)rails s command without starting it.docker build, an error occurred that the server did not start (undefined method` []' for nil: NilClass (NoMethodError))This is the process.
AWS was a trial app once, and I had set up automatic deployment as a production environment, so I proceeded without understanding the service well.
The problem is usually the fifth item. Lol
If you take a closer look,
--credential.yml.enc is encrypted and decrypted using master.key
--When git push, master.key is not pushed (because it is listed in .gitignore)
In other words, there was no master.key at the time of cloning. And master.key was created during the first credentials: edit command.
What's more, I deleted the credentials.yml file once and ran the credentials: edit command again, creating credentials.yml that was inconsistent with master.key.
As a result, it could not be encrypted or decrypted, and the RDS settings that had been created once had disappeared. Is it like that? Maybe
in this case,
--Once deleted master.key and credentials.yml
--Recreate the two files with the credentials.edit command
I went through the process!
It seems to be a fairly common error, so I found a lot of information when I looked it up, but it was a good study. If you have a similar case, please go beyond my corpse! !!
Recommended Posts