Skip to main content

Rails 5.2 Credentials

Rails • Asked by Philip Benton
3a1e7699eaf95b7c96b79830da5dd7e5

Me again :)

Question about the new credentials in 5.2...

I've upgraded to 5.2 and actually really like credentials but wondering. Is it now the place to store all sensitive information including database access, etc?

Currently I store db access within bash environment variables. It seems now that the only thing needed in the bash file is the RAILS_MASTER_KEY


Ce795239ba5dd2384fc2f88ffaff5451

Yep, you can put your database credentials in there and reference them in your database.yml I think.


3a1e7699eaf95b7c96b79830da5dd7e5

I've just successfully added an admin user to credentials and referenced it in my seed.rb file so I guess adding anything to it will work the same.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.