# Modules Routing Problem

**URL:** <https://www.ruby-forum.com/t/modules-routing-problem/130355>\
**Category:** Rails\
**Created:** [February 27, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/modules-routing-problem/130355 "2008-02-27T15:44:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darth\_timeus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f08c70/32.png) [@darth\_timeus](https://www.ruby-forum.com/u/darth_timeus)\
**Post date:** [February 27, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/modules-routing-problem/130355/1 "2008-02-27T15:44:13Z")

</div>

Hi i have been looking for information and i have not been able to  
find any guide regarding my problem. Here is the problem I create a  
controller/model name Service and inside service a created a module  
named Voip. So the ruby file inside /Controllers/services/  
voip\_controller.rb look like this  
Services::VoipController \< ServicesController  
def index  
…  
end  
def show  
…  
end  
end  
I also created a route like this  
map.resources :service do |service|  
service.resources :voip  
end

the I try to call the index like this  
[http://acing.acelerate.com:3000/services/voip/](http://acing.acelerate.com:3000/services/voip/)

and i get the error show below. I really don’t know what else to do  
all the other routes are woking fine. Any help will be really  
appreciate it.

ActiveRecord::RecordNotFound in ServicesController#show  
Couldn’t find Service with ID=voip  
RAILS\_ROOT: /srv/acing

Application Trace | Framework Trace | Full Trace  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1267:in `find_one' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1250:in `find\_from\_ids’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:504:in `find' app/controllers/services_controller.rb:16:in `show’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1267:in `find_one' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1250:in `find\_from\_ids’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:504:in `find' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:1158:in `send’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/base.rb:1158:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:697:in `call\_filters’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/filters.rb:689:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/benchmarking.rb:68:in `perform\_action\_without\_rescue’  
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/benchmarking.rb:68:in `perform\_action\_without\_rescue’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/rescue.rb:199:in `perform_action_without_caching' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/caching.rb:678:in `perform\_action’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
connection\_adapters/abstract/query\_cache.rb:33:in `cache' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:in `cache’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/caching.rb:677:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in `send’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/base.rb:524:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:685:in `process\_without\_session\_management\_support’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/session\_management.rb:123:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:388:in `process’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/dispatcher.rb:171:in `handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:115:in `dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/dispatcher.rb:126:in `dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:9:in `dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick\_server.rb:  
112:in `handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 78:in `service’  
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’  
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick\_server.rb:  
62:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/  
active\_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:  
39  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’  
script/server:3  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1267:in `find_one' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1250:in `find\_from\_ids’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:504:in `find' app/controllers/services_controller.rb:16:in `show’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/base.rb:1158:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:1158:in `perform\_action\_without\_filters’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/filters.rb:697:in `call_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:689:in `perform\_action\_without\_benchmark’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/rescue.rb:199:in `perform\_action\_without\_caching’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/caching.rb:678:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/query_cache.rb:33:in `cache’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
query\_cache.rb:8:in `cache' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/caching.rb:677:in `perform\_action’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/base.rb:524:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in `process\_without\_filters’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/filters.rb:685:in  
`process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/session_management.rb:123:in `process’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/base.rb:388:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:171:in `handle\_request’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/dispatcher.rb:115:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:126:in `dispatch\_cgi’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/  
action\_controller/dispatcher.rb:9:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 112:in `handle\_dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick\_server.rb:  
78:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’  
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start\_thread’  
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start\_thread’  
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each’  
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 62:in `dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/  
webrick.rb:66  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/  
active\_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:in `new\_constants\_in’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/  
active\_support/dependencies.rb:496:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb: 39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’  
script/server:3  
Request  
Parameters:

{“id”=\>“voip”}

Show session dump

* * *

:intended\_action: main  
:intended\_controller: /authentication  
:csrf\_id: f817ef286a069908731a4569846dffcc  
flash: !map:ActionController::Flash::FlashHash {}

Response  
Headers:

{“cookie”=\>[],  
“Cache-Control”=\>“no-cache”}
