Ask A Question


You’re not receiving notifications from this thread.

Rails 5.2 Credentials

Philip Benton asked in Rails

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


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


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.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.