# Are user-made modules supposed to work?

**URL:** <https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813>\
**Category:** Rails\
**Created:** [July 10, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813 "2006-07-10T18:40:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Daniel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@Jean-Daniel\_B](https://www.ruby-forum.com/u/Jean-Daniel_B)\
**Post date:** [July 10, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813/1 "2006-07-10T18:40:24Z")

</div>

Is there a reason why modularizing your controllers doesn’t work? I  
tried the following:

ruby script/generate scaffold Admin::Bug

But it just won’t work. I get a routing error when trying to access  
/admin/bugs/ :

Recognition failed for “/admin/bugs/”

P.S. If I create the model/controller individually it still doesn’t seem  
to work.

A bit of help would be greatly appreciated.

–  
Jd

---

<div class="post-metadata">

**Author:** ![Jean-Daniel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@Jean-Daniel\_B](https://www.ruby-forum.com/u/Jean-Daniel_B)\
**Post date:** [July 11, 2006, 12:15am UTC](https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813/2 "2006-07-11T00:15:54Z")

</div>

Damn, in the past week I wrote 2 emails to the list on this subject and  
no one ever answered back.

Is anybody using this feature? Is it supposed to be known to be  
broken? I’ve googled for hours and read a bunch of stuff and nothing  
ever helps me figuring out what’s going on.

---

<div class="post-metadata">

**Author:** ![Jean-Daniel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@Jean-Daniel\_B](https://www.ruby-forum.com/u/Jean-Daniel_B)\
**Post date:** [July 11, 2006, 2:29am UTC](https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813/3 "2006-07-11T02:29:16Z")

</div>

> ruby script/generate scaffold Admin::Bug
> 
> Recognition failed for “/admin/bugs/”

Try:

ruby script/generate scaffold bug “admin/bugs”

You need to follow the form:

ruby script/generate model “module/controller”  
(or an equivalent)

With the model name being singular and the controller name usually  
plural. You weren’t including a model in the scaffold generation  
request, and you were looking for a plural-named controller when you  
were generating a singular-named controller.

---

<div class="post-metadata">

**Author:** ![Jean-Daniel\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@Jean-Daniel\_B](https://www.ruby-forum.com/u/Jean-Daniel_B)\
**Post date:** [July 11, 2006, 2:55am UTC](https://www.ruby-forum.com/t/are-user-made-modules-supposed-to-work/97813/4 "2006-07-11T02:55:07Z")

</div>

Thanks for your help… It now works, but it seemed to actually be a  
RadRails problem. When I start Webrick through RadRail’s interface, the  
localhost:port/admin/bugs doesn’t work, but if I manually do ruby  
script/server and open a firefox, itworks fine.

Guess I’ll have to send a little email to the RadRails team…

Thank you for your time

–  
Jd
