similar to: How do I call the exception_notifier from my own rescue_action_in_public ?

Displaying 20 results from an estimated 100 matches similar to: "How do I call the exception_notifier from my own rescue_action_in_public ?"

2006 May 05
1
NameError when running exception_notification plugin?
Hi all, I installed the exception_notification plugin via ''script/plugin install'', and when configure it and try to run it, I get: NameError uninitialized constant ExceptionNotifiable This error occured while loading the following files: application.rb exception_notifiable.rb In my application.rb, I added this: include ExceptionNotifiable And in my development
2008 Mar 04
2
Action Mailer throwing underscores on template name
I''ve recently run into a problem with one of my applications that refuses to send emails using ActionMailer. Looking at the log, it become obvious what''s happening, the system is looking for templates with underscores at the end. Notice the exception_notification_ . For example: ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template found for
2007 Aug 16
0
Update from RoR 1.1.6 - 1.2.3 Rake fails
I am getting a message when I update my system from rails 1.1.6 to 1.2.3 running rake. []# rake test --trace (in /var/www/matrix.1.7.15) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! Expected /var/www/matrix.1.7.15/config/../vendor/plugins/
2006 Oct 03
0
changes to the exception_notification plugin
first off, this thing rocks. What a great little addition. It is missing one use case that I could find, and that is where a 404 occurs because a RoutingError occured at the controller level. If it happens after the controller has been found (say a view or ID is wrong), then this works. But if application.rb is not called, then it goes back to the default rails code instead of through the
2008 Jan 22
0
Trying to spec ExceptionNotifiable behavior
Hello List. I''m trying to overwrite part of ExceptionNotifiable (ExceptionNotification plugin) to render customized error 500 pages based on browser agents. For this, I''ve created a fake controller that inherits directly from ActionController::Base: class FooExceptionController < ActionController::Base include ExceptionNotifiable # this action should not fail, used for
2007 Jan 06
6
Exception notifier not working
I installed the exception notifier via: /script/plugin install -x exception_notification It resides in the vendor/exception_notification directory (as advertised). I''ve configured environment.rb with the following: ExceptionNotifier.exception_recipients = %w(blakemiller-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org) ExceptionNotifier.sender_address = %("Application Error"
2007 Jul 17
0
uninitialized constant ExceptionNotifiable deploy_with_migrations in TEST
I have installed the exception_notification plugin, and it works fine when system is deployed to production. and I have not problems deploying to dev, and not test environments. However, when I try to do a deploy_with_migrations, I get the uninitialized constant ApplicationController::ExceptionNotifiable error. There must be something ''special'' about the test env, but I
2011 Feb 17
3
Handling InvalidAuthenticityToken from bots
I''m using exception_notifier to get an email when a 500 error occurs in production. Lately I''m seeing a lot of nonsensical POSTs show up that cause an InvalidAuthenticityToken error. All the fields contain random characters. (For instance, "search_title"=>"BHQWTZpjGeb") Is there a way to detect them and not send the email, while still sending the email in
2007 Jun 16
2
Specs don''t find modules when using the secure_actions or ssl_requirement plugin
Hello, I''m trying the secure_actions plugin (or ssl_requirements) I''m installed the plugin, and added the include in application controller: class ApplicationController < ActionController::Base include ExceptionNotifiable include AuthenticatedSystem include SecureActions ... but when I try to run the specs I got this error:
2006 Oct 05
3
Exception Notifier plugin has stopped working.
Exception Notifier seems to have ceased working for some reason. I thought perhaps a change in edge rails was to blame, but I rolled back to 4900 and the problem was still there. The problem is that it generates an error in the _session.rhtml partial. It looks as if a method in the PP class is bombing. It says wrong number of argument (1 for 0), but there is no method on that line with
2007 Jan 11
0
writing tests for rescue_action_in_public
I''m having trouble with rescue_action_in_public, both in getting it to work right in my rails app, and in writing tests to make sure. What I ultimately want to do is test for what a normal user would see when an error is trapped. I override local_request? like so: application.rb -------------- def rescue_action_in_public(exception) render :text => "oops" end def
2007 Jul 26
2
Ruby 1.8.6 + Rails 1.2.3 + ErrorNotification == NameError !?
Hallo Everybody, I updated recently to the latest versions of Ruby and Rails. Now it seems to me that the plugin ErrorNotification doesn''t run anymore. I even tried to create a new project, installed the plugin and added the following line to my development.rb: [code] ExceptionNotifier.exception_recipients = "adress-QPFuF50DZNq+XT7JhA+gdA@public.gmane.org" [/code] When I try
2010 Aug 09
0
Exceptions in functional tests (rescue_action_in_public! broken?)
In 2.3, exceptions raised by controllers under functional tests were by default propagated to the test, but by using rescue_action_in_public! a test could trigger the production, public behavior and then use assert_response or similar to test the expected result. This was implemented via coordination between ActionController::Rescue and ActionController::TestCase::RaiseActionExceptions. This
2006 Feb 16
3
rescue_action_in_public question
I''m using the rescue_action_in_public example from the Agile book to handle errors and email serious ones to me. In my application.rb controller: def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownAction
2010 Aug 08
2
issue with rescue_action_in_public! and testing 404 responses
Hello, I''m new to rails and I''m trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I''ve run into is when I want to test that my controllers respond with a 404 for unfound records. Whenever I run the spec, the ActiveRecord::RecordNotFound exception is not caught by rails, causing the spec
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR: def rescue_action_in_public(exception) case exception when ActiveRecord::RecordNotFound, ActionController::UnknownAction render :template=>''/error'', :layout=>''application'', :status=>''404 Not Found'' else render :template=>''/error'',
2006 Nov 08
0
routing error does not get caught by rescue_action_in_public
I have this in my application controller. def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ::ActionController::UnknownAction, ::ActionController::RoutingError logger.warn("rendering 404 page") render(:file =>
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
2008 Jun 20
0
random InvalidAuthenticityToken errors
My login controller seems to be randomly raising InvalidAuthenticityToken errors. I''m using exception_notifier so I''ve got pretty solid debug output, but I can''t see any pattern to it. They are real users with different IPs and different who sometimes try repeatedly to join or log in and mail me when they can''t, so I don''t think it''s any kind
2010 Oct 19
0
Exception Notifier. . .2 questions
I''m adding exception notifier to a new rails app and seem to have a couple issues. It''s a rails3 (release) app with the latest EN from github. 1) It''s filtering params fine based on my standard log filters. However, I need to go a bit further and filter session and environment as well as I have customer CC information in session during a single request. Am I missing