Skip to content

Instantly share code, notes, and snippets.

@nikasulo
Created February 27, 2020 01:15
Show Gist options
  • Save nikasulo/ac5195b8fedb61a94ef0181725a305c3 to your computer and use it in GitHub Desktop.
Save nikasulo/ac5195b8fedb61a94ef0181725a305c3 to your computer and use it in GitHub Desktop.
config.before_configuration do
env_file = File.join(Rails.root, 'config', 'local_env.yml')
YAML.load(File.open(env_file)).each do |key, value|
ENV[key.to_s] = value
end if File.exists?(env_file)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment