Created
May 16, 2013 06:58
-
-
Save shu0115/5589892 to your computer and use it in GitHub Desktop.
Rails4.0.0.rc1 exception_notificationエラー ref: http://qiita.com/items/2039bcac71a9b11825b1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails s | |
---------- | |
/Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/class/attribute_accessors.rb:40:in `block in cattr_reader': invalid class attribute name: true (NameError) | |
---------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'exception_notification', github: 'smartinez87/exception_notification' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppName::Application.config.middleware.use( | |
ExceptionNotifier, | |
email_prefix: "[#{Rails.env}][Site Name] ", | |
sender_address: "xxxxx@gmail.com", | |
exception_recipients: ["xxxxx@gmail.com"] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# メール設定 | |
config.action_mailer.default_url_options = { host: '0.0.0.0:3000' } | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.perform_deliveries = true | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.smtp_settings = { | |
address: "smtp.gmail.com", | |
port: 587, | |
user_name: "xxxxx@gmail.com", | |
password: "xxxxxxxxxx", | |
authentication: 'plain', | |
enable_starttls_auto: true, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
raise | |
rescue Exception => exception | |
ExceptionNotifier.notify_exception(exception, env: request.env, data: { msg: "エラーテスト" }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@shu0115 can you solve this problem?