# Several 'app' directories?

**URL:** <https://www.ruby-forum.com/t/several-app-directories/55466>\
**Category:** Rails\
**Created:** [March 21, 2006, 12:57pm UTC](https://www.ruby-forum.com/t/several-app-directories/55466 "2006-03-21T12:57:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriscole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5fc32e/32.png) [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Post date:** [March 21, 2006, 12:57pm UTC](https://www.ruby-forum.com/t/several-app-directories/55466/1 "2006-03-21T12:57:57Z")

</div>

Hello, I’m new to ROR and my first wonder is to understand how to  
organize my application “per module”…

Imagine I want to build a web site including :

- the web site by itself
- a forum
- a wiki
- a shop

I would like to avoid putting all the controllers, views and models in  
the same app directories, polluting the subdirs with prefixed files like  
wiki\ __, shop\__ , forum\_\* -

All the modules must share the same resources on the app\_root directory  
(components, config, db, doc, and the like)

In fact, what I want to do is  
[http://myapp.com/module/controller/action](http://myapp.com/module/controller/action)  
and not only

> **[应用宝官网-全网最新最热手机应用游戏下载](https://sj.qq.com)**
>
> 应用宝是腾讯旗下官方手机app应用商店，致力于为您提供海量、优质、安全、最新的安卓应用游戏下载！

Which would be simply related to the subdirs  
/app\_root/app/module/controller  
/app\_root/app/module/views  
/app\_root/app/module/models  
/app\_root/app/module/helpers

Is it just a matter of playing with routes.rb ?

Could someone show me how to do ?

Thank you

Note : I allways asked these question on another ror forum and tought at  
first that I needed was see every module as a component but I think this  
is not the right solution. In the above example, the components would be  
more ‘low level’ (eg. authentification component)…

---

<div class="post-metadata">

**Author:** ![chriscole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5fc32e/32.png) [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Post date:** [March 21, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/several-app-directories/55466/2 "2006-03-21T17:58:04Z")

</div>

This is exactly what Rails Engines lets you do:

[http://rails-engines.org](http://rails-engines.org)

- james

On 3/21/06, Christophe C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the same app directories, polluting the subdirs with prefixed files like  
> Which would be simply related to the subdirs
> 
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![chriscole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/5fc32e/32.png) [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Post date:** [March 22, 2006, 12:42am UTC](https://www.ruby-forum.com/t/several-app-directories/55466/3 "2006-03-22T00:42:55Z")

</div>

Thank you James !  
It took me 3 hours to setup “engines” and created a simple engine but in  
fact it wasn’t that hard…

I just wonder why “engines” is not part of ROR itself ? It seems so  
sensible to me
