Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8183281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:06:40+00:00 2026-06-07T01:06:40+00:00

I am setting up a redirection through SendGrid for the mails sent by my

  • 0

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.

As it is specified there, 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…

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).

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.

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:06:42+00:00Added an answer on June 7, 2026 at 1:06 am

    My suggestion (what I’ve seen done):

    Move API keys and sensitive info into a yml file under config/.

    Load this yml file into a variable, for instance

    KEYS = YAML::load(File.open("#{RAILS_ROOT}/config/config.yml"))

    Voila.

    Also, when putting your code up on GitHub for example, this config.yml would be something you add to the .gitignore. Instead, make a config-example.yml and tell your developers to get their own keys and passwords and such, storing them in their local config.yml.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used session to store some config setting in MVC3 application, in my
Setting the scene: My asp.net web application carries a version number which is incremented
Setting a Magento store for a winery. They well bottles of wine, but you
Setting up the sandboxes for all these option is not feasible right now. So
Setting up email details in web.config - but no email is being sent! <appSettings>
I have been working towards deploying my rails application, and while there have been
Setting up a project structure; I am thinking is it better to have somewhat
Setting default values for System Configuration fields is well understood (via Chapagain and blog
Setting up new git installations. On one Windows laptop, I'm running (under cygwin): git
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.