# Please tell me what does this bug meanz?

**URL:** <https://www.ruby-forum.com/t/please-tell-me-what-does-this-bug-meanz/164176>\
**Category:** Rails\
**Created:** [March 29, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/please-tell-me-what-does-this-bug-meanz/164176 "2009-03-29T13:58:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamidraza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Post date:** [March 29, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/please-tell-me-what-does-this-bug-meanz/164176/1 "2009-03-29T13:58:53Z")

</div>

controller method is =\>

def call

```
@template = MailRoomTemplate.find(:all)
@send_message = SendMessage.new

```

end

it is not going to views/send\_messages/call

and this error comes

"NoMethodError in Send messagesController#new

undefined method `render’ for #MailRoomTemplate:0x551d358

RAILS\_ROOT: E:/D Drive/Ruby Projects/MailRoom/MailRoom" in explorer

on server =======\> the error is

Processing ReceivedLettersController#index (for 127.0.0.1 at 2009-03-29  
16:46:11) [GET]  
â†[4;36;1mSQL (0.0ms)â†[0m â†[0;1mSET SQL\_AUTO\_IS\_NULL=0â†[0m  
â†[4;35;1mReceivedLetter Load (0.0ms)â†[0m â†[0mSELECT \* FROM  
`received_letters` â†[0m  
Rendering template within layouts/application  
Rendering received\_letters/index  
â†[4;36;1mReceivedLetter Columns (7.0ms)â†[0m â†[0;1mSHOW FIELDS FROM  
`received_letters`â†[0m  
Completed in 234ms (View: 211, DB: 0) | 200 OK  
[[http://127.0.0.1/received\_letters](http://127.0.0.1/received_letters)]

Processing SendMessagesController#call (for 127.0.0.1 at 2009-03-29  
16:46:13) [GET]  
â†[4;35;1mSQL (0.0ms)â†[0m â†[0mSET SQL\_AUTO\_IS\_NULL=0â†[0m  
â†[4;36;1mMailRoomTemplate Load (1.0ms)â†[0m â†[0;1mSELECT \* FROM  
`mail_room_templates` â†[0m  
â†[4;35;1mMailRoomTemplate Columns (10.0ms)â†[0m â†[0mSHOW FIELDS FROM  
`mail_room_templates`â†[0m

NoMethodError (undefined method `_exempt_from_layout?' for #<Array:0x55ad688>): c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/layout.rb:250:in ` **send** ’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/layout.rb:250:in  
`pick_layout' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:879:in `render\_without\_benchmark

```
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in

```

`render' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/benchmarking.rb:51:in  
`render' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:in `render\_without\_benchmark

```
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in

```

`render' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/benchmarking.rb:51:in  
`render' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1248:in `default\_render’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:1254:in  
`perform_action_without_ ilters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call\_filters’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/filters.rb:610:in  
`perform_action_withou _benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform\_action\_wi  
hout\_rescue’  
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform\_action\_wi  
hout\_rescue’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/rescue.rb:136:in  
`perform_action_without caching' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform\_acti  
n’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/abstract/query\_cache.r  
:34:in `cache' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/caching/sql\_cache.rb:12:in  
`perform_acti n' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `send’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:524:in  
`process_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process\_without\_sessi  
n\_management\_support’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session\_management.rb:134:in  
`process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:183:in  
`handle_request' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch\_unlocked’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:123:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:122:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch\_cgi’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:39:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:76:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel/rails.rb:74:in  
`synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in  
`process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in  
`process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in  
`new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load\_without\_new  
constant\_marking’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:142:in  
`load' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new\_constants\_in

```
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in

```

`load' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:521:in  
`new\_constants\_in

```
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in

```

`require' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require’  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require’  
script/server:3

Processing SendMessagesController#call (for 127.0.0.1 at 2009-03-29  
16:46:13) [GET]

NoMethodError (undefined method `render' for #<Array:0x55ad688>): c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:111:in `rescue\_action\_locally’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/rescue.rb:128:in  
`rescue_action_without_ andler' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:61:in `rescue\_action’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/rescue.rb:138:in  
`perform_action_without caching' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform\_acti  
n’  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/abstract/query\_cache.r  
:34:in `cache' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/caching/sql\_cache.rb:12:in  
`perform_acti n' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `send’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/base.rb:524:in  
`process_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process\_without\_sessi  
n\_management\_support’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/session\_management.rb:134:in  
`process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:183:in  
`handle_request' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch\_unlocked’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:123:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:122:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch\_cgi’  
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:39:in  
`dispatch' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:76:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/…/lib/mongrel/rails.rb:74:in  
`synchronize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in `process’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in  
`process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in  
`process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`initialize' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in  
`new' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in  
`run' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in  
`run’  
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel\_rails:281

---

<div class="post-metadata">

**Author:** ![hamidraza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Post date:** [March 29, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/please-tell-me-what-does-this-bug-meanz/164176/2 "2009-03-29T14:41:18Z")

</div>

On Mar 29, 12:58 pm, Hamid R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> and this error comes
> 
> "NoMethodError in Send messagesController#new
> 
> undefined method `render’ for #MailRoomTemplate:0x551d358

It means that controllers already have a magic instance variable  
called @template that is used internally by rails and that you should  
pick a different name.

Fred

---

<div class="post-metadata">

**Author:** ![hamidraza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Post date:** [March 29, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/please-tell-me-what-does-this-bug-meanz/164176/3 "2009-03-29T14:46:43Z")

</div>

Frederick C. wrote:

> On Mar 29, 12:58ï¿½pm, Hamid R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > and this error comes
> > 
> > "NoMethodError in Send messagesController#new
> > 
> > undefined method `render’ for #MailRoomTemplate:0x551d358
> 
> It means that controllers already have a magic instance variable  
> called @template that is used internally by rails and that you should  
> pick a different name.
> 
> Fred

thxxxxxxxxxxxxxxxxxxxxxxxxxxxx a lot and it worked 🙂
