DEV Community

Cover image for 🀫 Secrets, environment variables & config files: the Ruby On Rails case

🀫 Secrets, environment variables & config files: the Ruby On Rails case

Vincent on December 16, 2019

πŸ‘‹ Hi there and welcome to my 5th post on dev.to about Ruby On Rails learning. People started to ask me what were my motivations for writing article...
Collapse
 
guillaumeocculy profile image
Guillaume Occuly • Edited

Great article!

Is there any way to have a default value with "master" credentials ?
I explain myself :
If Rails.application.credentials.foo is nil on staging (config/credentials/staging.yml.enc),
we look to config/credentials.ymc.enc to find the default value BAR

Collapse
 
vvo profile image
Vincent

Hey there, I am no more using Rails so really I dunno! You can ask on their GitHub I guess and reply here if you find something. Good luck

Collapse
 
rochacbruno profile image
Bruno Rocha

I created Dynaconf (for Python) which resolves everything you mentiones including yaml, toml, json files, secrets, envvars and vault services.

are there any rails alternative?

Github.com/rochacbruno/dynaconf

Collapse
 
vvo profile image
Vincent

Hi there, I would say maybe the closest to that would be github.com/laserlemon/figaro but not sure so I hope people with experience in the Rails community will jump in also!

For now, Rails semantics are completely fine for most applications though.