I have a few web services that require secure tokens/keys/passwords to be passed in. Where should I define these secure values for my rails app to see? I want the development keys in version control, but don’t want the production keys in version control. How should I set this up? I’m new to rails.
I have a few web services that require secure tokens/keys/passwords to be passed in.
Share
You see the question properly.
Put your
passwordsandkeysin some yml file excluded from version control.Then on your production server, create the very same file and symlink your app to it every time you deploy.
EDIT.
Capistrano is almost made to fits these needs:
put your
ymlfiles in thesharedfolderIn your capistrano
deploy.rbfile:to work with yml files: http://railscasts.com/episodes/85-yaml-configuration-file