# Routes problem

**URL:** <https://www.ruby-forum.com/t/routes-problem/137176>\
**Category:** Rails\
**Created:** [May 9, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/routes-problem/137176 "2008-05-09T17:45:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/d6d6ee/32.png) [@jessruby](https://www.ruby-forum.com/u/jessruby)\
**Post date:** [May 9, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/routes-problem/137176/1 "2008-05-09T17:45:49Z")

</div>

Hi i configured custom routes but i got the following errors

Error Number 1:  
You have a nil object when you didn’t expect it!  
The error occurred while evaluating nil.to\_sym

17:

 \<%=quipment.numero\_activo\_fijo%\>   
18: \<%=quipment.direccion\_mac%\>   
19: \<%=quipment.numero\_serie%\>   
20: \<%= link\_to ‘Show’, quipment %\>  
21: \<%= link\_to ‘Edit’, edit\_equipment\_path(quipment) %\>  
22: \<%= link\_to ‘Destroy’, quipment, :confirm =\> ‘Are you  
sure?’, :method =\> :delete %\>  
23: 

The thing is that quipment is defined. Here is the source code:

\<% for quipment in @equipments %\>

 \<%=quipment.numero\_activo\_fijo%\> \<%=quipment.direccion\_mac%\> \<%=quipment.numero\_serie%\> \<%= link\_to 'Show', quipment %\> \<%= link\_to 'Edit', edit\_equipment\_path(quipment) %\> \<%= link\_to 'Destroy', quipment, :confirm =\> 'Are you sure?', :method =\> :delete %\> \<% end %\>

Now if I remove the line 20, 21, 22 from the file i got error number 2  
Error number 2:

undefined local variable or method `new\_equipment\_path’ for  
#ActionView::Base:0x2aaaae5c3bf8

Here is the route for equipments

map.resources :equipment,  
:singular=\>:equipment\_instance,  
:collection =\>{  
:add\_equipment =\> :get,  
:index =\> :get  
}

if i remove the :singular =\> xxx line the problem is solved but the new  
methods give me errors

Thank you very much for the help
