Exception notification plugin not working in production

Hello all,

I am using Rails 2.0.2 and the plugin Exception notification. Contrary
to all i haven't got any problem to get it work and send me errors
notification in development, but i do in production. Of course i have
disabled all the tricks to make it work in development before
deploying.
The mailer is well configured because i do receive email for other
actions ... so i simply don't get it.

Do i need, after plugin installation to move the exception_notifier.rb
file (mailer) to the lib or model directory, in production ? I don't
think so because i don't do that in development and it works

Someone could help me plz ?

My guess is Rails sees the request as a local request. Does the user get a stack trace or the Rails error page?

For example, I haven’t found out yet (haven’t really looked for it too) why Apache with load balancing makes Rails think all requests from the local network (192.168.xx.xx) should be considered as a local request, requests from out of that network make Exception Notifier send the mails out. Very weird. IIRC, a setup with my patched Pound balancer (search google for my rimuhosting forum post on that matter) makes Rails behave normally, only real localhost requests are considered as such.

Best regards

Peter De Berdt

I just put the following into config/initializers/notify_exceptions.rb:

ExceptionNotifier.exception_recipients = %w(mike@domain.com)
ExceptionNotifier.email_prefix = "[MYDOMAIN] "
ExceptionNotifier.sender_address = %("Application Error"
<app.error@domain.com>)

and make sure you have the following in environments/production.rb

config.action_controller.consider_all_requests_local = false

and in ApplicationController:

include ExceptionNotifiable
# remove any consider_local lines

Does the ExceptionNotifier mail message show up in your logfile? Does
your server mail.log file display any attempt to deliver the message?