Skip to content

Instantly share code, notes, and snippets.

@shu0115
Created May 16, 2013 06:58
Show Gist options
  • Save shu0115/5589892 to your computer and use it in GitHub Desktop.
Save shu0115/5589892 to your computer and use it in GitHub Desktop.
Rails4.0.0.rc1 exception_notificationエラー ref: http://qiita.com/items/2039bcac71a9b11825b1
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)
----------
gem 'exception_notification', github: 'smartinez87/exception_notification'
AppName::Application.config.middleware.use(
ExceptionNotifier,
email_prefix: "[#{Rails.env}][Site Name] ",
sender_address: "xxxxx@gmail.com",
exception_recipients: ["xxxxx@gmail.com"]
)
# メール設定
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,
}
begin
raise
rescue Exception => exception
ExceptionNotifier.notify_exception(exception, env: request.env, data: { msg: "エラーテスト" })
end
@onurozgurozkan
Copy link

@shu0115 can you solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment