Rails has evironment credentials. Try this command `bin/rails credentials:edit --environment production` and this will generate `config/credentials/production.yml.enc` along with `config/credentials/production.key` rather than `config/credentials.yml.enc` and `config/master.key`. You can do the same for the test and development environments. For multi-level keys you can use this syntax `Rails.application.credentials.aws.access_key_id`. Rails will know which credentials file to use automagically without the need to specify the environment. Also, if you add the editor you want to use to your bashrc (or equivalent), you don't need to specify the editor in the command. EDIT: don't forget to add your secret_key_base to the environment credentials.
@Deanin2 жыл бұрын
Had no idea about this, thank you!
@MattBudz2 жыл бұрын
@@Deanin It's quite handy for real world projects. Sadly it's not really documented anywhere.
@gregcurl55949 ай бұрын
Thanks!💯
@Deanin9 ай бұрын
I should be thanking you! I'm glad the video was helpful 🙂
@shiccorama Жыл бұрын
THANKS A MILLION, DEANIN.
@ravi-xv7et2 жыл бұрын
You are real hero for Ruby on rails as no one in the KZbin is helping like this for Ruby on rails, can you make any video with CRUD operations on GraphQL
@Deanin2 жыл бұрын
I can look into it, absolutely. I've been meaning to revisit it now that I understand Rails a bit better. I also appreciate the kind words 🙂