How to store credentials for third party services in Rails <p>I am setting up a redirection through SendGrid for the mails sent by my rails application. However I am not really satisfied with the way I'm told to store the credentials.</p> <p>As it is specified <a href="http://docs.sendgrid.com/documentation/get-started/integrate/examples/rails-example-using-smtp/" rel="nofollow">there</a>, they suggest to overwrite ActionMailers defaults in the config/environment.rb file. I've found out that my predecessor created a initializers/smtp.rb file where he defined the previous settings, but by discovering this file, I discovered the SMTP password...</p> <p>If I modify any of these files, anuone having access to the git repository will have access to the credentials (including the front-end and back-end freelances we work with).</p> <p>I was thinking of creating a file that would stay on the server's shared folder (like the database.yml file) and that would be symlinked to the app each time we deploy thanks to capistrano.</p> <p>What do you think of it? Would it be okay to just move this initializers/smtp.rb to the server's shared folder and symlink it when deploying? </p>