# Undefined method \`respond\_to' when using Exception Notifier

**URL:** <https://www.ruby-forum.com/t/undefined-method-respond-to-when-using-exception-notifier/55562>\
**Category:** Rails\
**Created:** [March 22, 2006, 3:16am UTC](https://www.ruby-forum.com/t/undefined-method-respond-to-when-using-exception-notifier/55562 "2006-03-22T03:16:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aseldo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@aseldo](https://www.ruby-forum.com/u/aseldo)\
**Post date:** [March 22, 2006, 3:16am UTC](https://www.ruby-forum.com/t/undefined-method-respond-to-when-using-exception-notifier/55562/1 "2006-03-22T03:16:36Z")

</div>

I’m trying to use the exception notifier plugin and I’m getting this  
error  
message:

NoMethodError (undefined method `respond_to' for #<Adm::PeriodController:0xb74c9804>): /vendor/plugins/exception_notification/lib/exception_notifiable.rb:64:in`render\_500’  
/vendor/plugins/exception\_notification/lib/exception\_notifiable.rb:76:in  
`rescue\_action\_in\_public’

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.

-Kelly

---

<div class="post-metadata">

**Author:** ![aseldo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e95f7d/32.png) [@aseldo](https://www.ruby-forum.com/u/aseldo)\
**Post date:** [March 23, 2006, 11:10pm UTC](https://www.ruby-forum.com/t/undefined-method-respond-to-when-using-exception-notifier/55562/2 "2006-03-23T23:10:23Z")

</div>

Kelly F. wrote:

> ## `rescue\_action\_in\_public’
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

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  
[http://dev.rubyonrails.org/svn/rails/plugins/exception\_notification/](http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/)

```
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  
end

```
def render_500

```

- render :file =\> “#{RAILS\_ROOT}/public/500.html”, :status =\> “500  
Error”

- 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  
end

daniel
