forked from DAddYE/exception-notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
56 lines (36 loc) · 1.96 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ExceptionNotifier
=================
This plugin are raised when an exception fire up in controllers.
Now you can personalize exception and simplify the layout using templates
in app/views/exception
when an exception is raised it try to send an email, and for send an email
you need to configure in enviroment.
For test layouts and mailing do this:
Edit enviroments/development.rb
config.action_controller.consider_all_requests_local = false
Then in your browser open 192.168.1.3 where 192.168.1.3 is your lan ip.
Remember that if you use 127.0.0.1 Rails don't raise "production" errors.
Installation
============
Rails::Initializer.run do |config|
config.gem 'Lipsiasoft-exception-notifier', :lib => 'exception_notifier', :source => 'http://gems.github.com'
end
Example
=======
script/generate exception_notifier [--haml-template]
Personalize yours app/views/exceptions/ templates
Remember that they use the layout of the controller where the exception is raised
Then in /config/initializers/exception_notifier.rb
Lipsiadmin::Mailer::ExceptionNotifier.sender_address = %("Exception Notifier" <[email protected]>)
Lipsiadmin::Mailer::ExceptionNotifier.recipients_addresses = %([email protected])
Lipsiadmin::Mailer::ExceptionNotifier.email_prefix = "[Your Progect]"
Redmine
=======
This plugins is useful for redmine, if you have set the mail handler
http://www.redmine.org/wiki/redmine/RedmineReceivingEmails
you need to set the inizializers/exception_notifier.rb like this
Lipsiadmin::Mailer::ExceptionNotifier.sender_address = %("Exception Notifier" <[email protected]>)
Lipsiadmin::Mailer::ExceptionNotifier.recipients_addresses = %([email protected])
Lipsiadmin::Mailer::ExceptionNotifier.email_prefix = "[Your Project]"
Lipsiadmin::Mailer::ExceptionNotifier.extra_options = { :project => "your-project-in-redmine", :tracker => "Bug", :priority => "Urgent" }
Copyright (c) 2009 Lipsiasoft s.r.l., released under the MIT license