I am trying to put my email password in a .yml file.
In config/initializers , I have an emailers_config.rb file
require 'yaml' EMAIL_CONFIG = YAML.load(File.read(Rails.root + "config/mailer_config.yml"))
and in my config/mailer_config.yml I have:
#production password smtp_password_pro: foo #devevopment env password smtp_password_dev: bar
Now it seems that my initializations are not working, because I get this uninitialized constant EMAIL_CONFIG (NameError)
Now Rails should bark everything in the initializers folder, so downloading the file is not a problem.
What is wrong here?
source share