0

I accidentally uploaded my secrets.yml file to Github. I changed my credentials and moved it to a new secrets_final.yml file that I've property setup in gitignore. Problem now is unless I hardcode credentials, the environment variables don't seem to pull from this new file.

How do I change default secrets location?

dgreen22
  • 388
  • 4
  • 19
  • If I understood you correctly you want to tell Rails that your file with secrets is in another file than in `config/secrets.yml`? But what was the reason to change filename from `secrets.yml` to `secrets_final.yml`? Why you can't use default file anymore? – Maciej Nędza Mar 19 '18 at 22:31
  • @MaciejNędza For some reason even after I added it to gitignore, it still tracked the file. You got me thinking though and I was able to find a way to make that stop. Thanks for the question. – dgreen22 Mar 20 '18 at 01:08

1 Answers1

0

I figured out how to get gitignore to stop tracking a file as when I added it to gitignore file, it still tracked file because it was cached. No need to change defaults secrets.yml - just remove cache and use same file. Answer is here: https://stackoverflow.com/a/11451731/5551783

dgreen22
  • 388
  • 4
  • 19