Eugueny
2008-Sep-18 01:41 UTC
Rails::Initializer.run() does not apply settings from Configuration object?
I wonder if this is a bug in Rails somewhere. The configuration I apply in Rails::Initializer.run() does not go anywhere, i.e. does not get applied to ActionMailer.Base Here is a short snippet from my environment.rb Rails::Initializer.run do |config| config.action_mailer.smtp_settings = { :address => "foobar.com" } end Later on if I inspect ActionMailer::Base.smtp_settings, I don''t see that - the address is Rails'' default "localhost". I Googled it, but everybody seems to be applying settings to ActionMailer::Base directly... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Sep-18 07:54 UTC
Re: Rails::Initializer.run() does not apply settings from Configuration object?
> I wonder if this is a bug in Rails somewhere. The configuration I > apply in Rails::Initializer.run() does not go anywhere, i.e. does not > get applied to ActionMailer.Base > > Here is a short snippet from my environment.rb > > Rails::Initializer.run do |config| > config.action_mailer.smtp_settings = { :address => "foobar.com" } > endI have equivalent settings applied in my environment.rb file and everything''s functioning as I''d expect. Can you reproduce this in a brand new rails application?> Later on if I inspect ActionMailer::Base.smtp_settings, I don''t see > that - the address is Rails'' default "localhost". > I Googled it, but everybody seems to be applying settings to > ActionMailer::Base directly... > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Eugueny
2008-Sep-24 23:20 UTC
Re: Rails::Initializer.run() does not apply settings from Configuration object?
Michael, you''re right - on a clean Rails application the settings DO get carried over... I am looking what can be wrong with my app then... If you have any hints where to look, please let me know. Regards, Ev On Sep 18, 2:54 am, "Michael Koziarski" <mich...@koziarski.com> wrote:> > I wonder if this is a bug in Rails somewhere. The configuration I > > apply in Rails::Initializer.run() does not go anywhere, i.e. does not > > get applied to ActionMailer.Base > > > Here is a short snippet from my environment.rb > > > Rails::Initializer.run do |config| > > config.action_mailer.smtp_settings = { :address => "foobar.com" } > > end > > I have equivalent settings applied in my environment.rb file and > everything''s functioning as I''d expect. Can you reproduce this in a > brand new rails application? > > > Later on if I inspect ActionMailer::Base.smtp_settings, I don''t see > > that - the address is Rails'' default "localhost". > > I Googled it, but everybody seems to be applying settings to > > ActionMailer::Base directly... > > -- > Cheers > > Koz--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---