sergio-SZhfuDltjDxEfCMKe0UOsQC/G2K4zDHf@public.gmane.org
2005-Nov-13 20:38 UTC
ExeceptionNotifier troubles
I am having a hard time installing the ExeceptionNotifier plugin. The README says: "specify the email recipients in your environment:" ExceptionNotifier.exception_recipients = %w(myown-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org)" I tried putting the line above in the environment.rb or the /environments/development.rb and both prevent me from booting WEBrick. here is the error: => Booting WEBrick... /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:200:in `const_missing'': uninitialized constant ExceptionNotifier (NameError) any clues? Thanks, Serge
On Nov 13, 2005, at 1:38 PM, sergio-SZhfuDltjDxEfCMKe0UOsQC/G2K4zDHf@public.gmane.org wrote:> I am having a hard time installing the ExeceptionNotifier plugin. The > README says: > > "specify the email recipients in your environment:" > ExceptionNotifier.exception_recipients = %w(myown-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org)" > > I tried putting the line above in the environment.rb or the > /environments/development.rb and both prevent me from booting WEBrick. > here is the error: > > => Booting WEBrick... > /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/ > dependencies.rb:200:in > `const_missing'': uninitialized constant ExceptionNotifier (NameError) > > any clues?The problem is that the dev/test/prod environments are loaded before plugins are loaded. You need to put the line in environment.rb itself. If you want to send to different addresses based on the current environment, you can do a case statement: ExceptionNotifier.exception_recipients = case RAILS_ENV when "development" then %w(devperson-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org) when "production" then %w(prodperson-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org other-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org) when "test" then [] end - Jamis