Web Development

It is always a better idea for configuration variables to stay on the server as environment variables instead of putting them on your repository. It makes it less likely for someone to have access to them. Here are a few ways to set environment variables for your Rails application.

~/.bashrc File

dotenv

figaro

Figaro is a nice gem that simplifies configuration files.
bc(language-ruby). gem “figaro”

You might need to add the additional yml file to .gitignore.

# config/application.yml

application_conf: "882354"
application_key: "fausdhf7(0sadfsmd__nfasdf"
some_conf: "23456789hdsfdsfasdf132"

These can be used throughout the application via ENV["application_key"]