Forum: Ruby on Rails undefined method `respond_to' when using Exception Notifier

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kelly F. (Guest)
on 2006-03-22 04:16
(Received via mailing list)
I'm trying to use the exception notifier plugin and I'm getting this

NoMethodError (undefined method `respond_to' for

Any suggestions? I suspect there is something missing. This project is
stored in cvs and it seems like it got confused by this plugin some how.

Oh. This is the message I see in the production log when I intentionally
generate an uncaught exception.

daniel wiesmann (Guest)
on 2006-03-24 00:10
(Received via mailing list)
Kelly F. wrote:
> `rescue_action_in_public'
> ------------------------------------------------------------------------
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid

I just ran into the same problem when i installed the plugin today.

Turns out the plugin recently got upgraded, and might be using some
rails v1.1 methods. upgrading would probably fix your problem, though
i have not tried it.
i just used the older version of the plugin, only a couple lines
of code seem to have changed in exception_notifiable.rb.

svn di -r 3570

    def render_404
-    render :file => "#{RAILS_ROOT}/public/404.html", :status => "404
Not Found"
+    respond_to do |type|
+      type.html { render :file => "#{RAILS_ROOT}/public/404.html",
:status => "404 Not Found" }
+      type.all  { render :nothing => true, :status => "404 Not Found" }
+    end

    def render_500
-    render :file => "#{RAILS_ROOT}/public/500.html", :status => "500
+    respond_to do |type|
+      type.html { render :file => "#{RAILS_ROOT}/public/500.html",
:status => "500 Error" }
+      type.all  { render :nothing => true, :status => "500 Error" }
+    end

This topic is locked and can not be replied to.