I'm trying to work on a Rails site here in it's development environment, where I want to test email delivery, and I can't work out why properties declared in the main environment.rb
aren't being overwritten by the more specific development.rb
file that I presume would be loaded when booting a rails app.
My understanding here is that values in more specific environment config files like this should override the shared 'environment.rb' config file, so if I have declared some email settings like so in config/environment.rb
...
ActionMailer::Base.smtp_settings = {
:address => 'smtp.hostingcompany.com',
:port => 25,
:domain => 'productiondomain.net',
:authentication => :login,
:user_name => "productiondomainmailer",
:password => "TOP_SEKRIT"
}
... then code here in config/environments/development.rb
below should override the ActionMailer:Base.smtp_settings
hash:
ActionMailer::Base.smtp_settings = {
:domain => 'developmentdomain.net'
}
However, when load the app in the development environment, or from script/console
to check the value of ActionMailer::Base.smtp_settings[:domain]
, it's still listed as 'productiondomain.net'.
Why might this happening?