# Association Problem in development server

**URL:** <https://www.ruby-forum.com/t/association-problem-in-development-server/122053>\
**Category:** Rails\
**Created:** [December 4, 2007, 7:25am UTC](https://www.ruby-forum.com/t/association-problem-in-development-server/122053 "2007-12-04T07:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [December 4, 2007, 7:25am UTC](https://www.ruby-forum.com/t/association-problem-in-development-server/122053/1 "2007-12-04T07:25:04Z")

</div>

\<%= task.task\_users.collect{|task\_user| task\_user.court\_user.user.name}

The above code throwing the following error.

undefined local variable or method `task\_users’ for  
#\<#Class:0x5e8899c:0x5e88974\>

Task.rb has the following code:

has\_many :task\_users, :dependent =\> :destroy

This happens only in the development server.

---

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [December 4, 2007, 9:23am UTC](https://www.ruby-forum.com/t/association-problem-in-development-server/122053/2 "2007-12-04T09:23:21Z")

</div>

Ayyanar Aswathaman wrote:

> \<%= task.task\_users.collect{|task\_user| task\_user.court\_user.user.name}
> 
> The above code throwing the following error.
> 
> undefined local variable or method `task\_users’ for  
> #\<#Class:0x5e8899c:0x5e88974\>
> 
> Task.rb has the following code:
> 
> has\_many :task\_users, :dependent =\> :destroy
> 
> This happens only in the development server.

Ignore this one. Find the briefed one with the topic "Undefined method  
error "  
in the forums.
