# ActionView::Template Error

**URL:** <https://www.ruby-forum.com/t/actionview-template-error/88448>\
**Category:** Rails\
**Created:** [March 11, 2007, 8:08am UTC](https://www.ruby-forum.com/t/actionview-template-error/88448 "2007-03-11T08:08:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serdar\_KSSSSlSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@Serdar\_KSSSSlSSSSSS](https://www.ruby-forum.com/u/Serdar_KSSSSlSSSSSS)\
**Post date:** [March 11, 2007, 8:08am UTC](https://www.ruby-forum.com/t/actionview-template-error/88448/1 "2007-03-11T08:08:01Z")

</div>

All,  
I’ve started to get ActionView::TemplateError (undefined method  
`errors’ for nil:NilClass) on all forms that have error\_message\_on.  
I’m stumped as this is not ocurring in development but in production  
so I can’t reproduce the error locally.

ActionView::TemplateError (undefined method `errors’ for nil:NilClass)  
on line #5 of app/views/account/\_register\_form.rht$  
2:   
3: Registration  
4:

5: \<%=error\_message\_on(:user, :email, 'Email ', ‘’, ‘inputError’)%\>  
6:

You’ll be logging into netTrader  
with this address
  
7: Email  
8: \<%= text\_field ‘user’, ‘email’, {:maxlength =\> 200, :size =\> 30}  
%\>

```
/home/2363/data/rubygems/gems/gems/actionpack-1.12.5/lib/action_view/helpers/active_record_helper.rb:88:in

```

`error_message_on' #{RAILS_ROOT}/app/views/account/_register_form.rhtml:5:in `\_run\_rhtml\_account\_\_register\_form’

–  
Cheers,  
Serdar Kilic

> **[kilic.net](http://weblog.kilic.net/)**
>
> kilic.net - the weblog of Serdar Kilic
