Created
July 26, 2017 02:53
-
-
Save danman01/a01057cf9f8d4a5bd060433dfb3ce73d to your computer and use it in GitHub Desktop.
generate secrets for rails projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generate_secrets { | |
echo SECRET_KEY_BASE_DEVELOPMENT=`bundle exec rake secret` | tee .env && echo SECRET_KEY_BASE_TEST=`bundle exec rake secret` | tee -a .env | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script places new secret keys in your .env file. Put this in your ~/.bash_profile, ensure it's loaded up, then call it from within our rails project:
generate_secrets