# Nested resources on shared host w/rails 1.2.3

**URL:** <https://www.ruby-forum.com/t/nested-resources-on-shared-host-w-rails-1-2-3/121237>\
**Category:** Deployment\
**Created:** [November 25, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/nested-resources-on-shared-host-w-rails-1-2-3/121237 "2007-11-25T22:26:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rajo](https://www.ruby-forum.com/u/rajo)\
**Post date:** [November 25, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/nested-resources-on-shared-host-w-rails-1-2-3/121237/1 "2007-11-25T22:26:24Z")

</div>

Hello I am currently trying to deploy a rails app to a shared host  
running rails 1.2.3 with apache and cgi (no fcgi access). The hosting  
service is icdsoft. I made a demo rails app and imported my files where  
needed appropriately and imported my bootstrapped database. Whenever I  
call a nested resource path it causes an error where it seems it thinks  
the resource path is a method and not a url. Here is the error is  
throws me

NoMethodError in Store#index

Showing app/views/products/\_products\_thumbs.rhtml where line #3 raised:

undefined method `section\_product\_path’ for  
#\<#Class:0xb738cb30:0xb738cb08\>  
Extracted source (around line #3):

1:

  
2: \<% if photo = Photo.find\_by\_id(products\_thumbs.photo\_id) %\>  
3: \<%= link\_to(image\_tag(photo.public\_filename(:small)),  
section\_product\_path(products\_thumbs.section, products\_thumbs.type,  
products\_thumbs.brand, products\_thumbs)) %\>  
4: \<% else %\>  
5: \<%=  
link\_to(image\_tag(’/images/site-images/photo\_coming\_soon.gif’),  
section\_product\_path(products\_thumbs.section, products\_thumbs.type,  
products\_thumbs.brand, products\_thumbs)) %\>  
6: \<% end %\>  
Trace of template inclusion: /app/views/store/index.rhtml

RAILS\_ROOT: …/config/…

Application Trace | Framework Trace | Full Trace  
#{RAILS\_ROOT}/app/views/products/\_products\_thumbs.rhtml:3:in  
`_run_rhtml_47app47views47products47_products_thumbs46rhtml' #{RAILS_ROOT}/app/views/store/index.rhtml:12:in`\_run\_rhtml\_47app47views47store47index46rhtml’  
#{RAILS\_ROOT}/app/controllers/store\_controller.rb:9:in `index' #{RAILS_ROOT}/app/controllers/store_controller.rb:9:in`index’  
Request

Parameters: None

Show session dump

Response

Headers: {“cookie”=\>[], “Content-Type”=\>“text/html”,  
“Cache-Control”=\>“no-cache”}

and here is my nested resource in question

map.resources :sections, :member =\> { :higher =\> :put, :lower =\> :put  
}, :path\_prefix =\> ‘catalog’ do |sections|  
sections.resources :types, :path\_prefix =\> ‘catalog/:section’  
sections.resources :brands, :path\_prefix =\> ‘catalog/:section’  
sections.resources :products, :path\_prefix =\>  
‘catalog/:section/:type/:brand’  
end

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![rajo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rajo](https://www.ruby-forum.com/u/rajo)\
**Post date:** [November 25, 2007, 10:53pm UTC](https://www.ruby-forum.com/t/nested-resources-on-shared-host-w-rails-1-2-3/121237/2 "2007-11-25T22:53:25Z")

</div>

Further investigation makes me think there might be a problem with my  
to\_param action in my product model which is

def to\_param  
“#{id}-#{permalink}”  
end

which I use to create clean urls, I use this function on many of my  
models.
