# \[RAILS 3\] 2 sup app in 1 app

**URL:** <https://www.ruby-forum.com/t/rails-3-2-sup-app-in-1-app/186222>\
**Category:** Rails\
**Created:** [April 2, 2010, 11:50am UTC](https://www.ruby-forum.com/t/rails-3-2-sup-app-in-1-app/186222 "2010-04-02T11:50:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolas2b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@nicolas2b](https://www.ruby-forum.com/u/nicolas2b)\
**Post date:** [April 2, 2010, 11:50am UTC](https://www.ruby-forum.com/t/rails-3-2-sup-app-in-1-app/186222/1 "2010-04-02T11:50:00Z")

</div>

Hi,

## I’m building an app which will become quite big (I hope 😉 ) and so I want to separate admin part and customers part. By separate, I mean not 2 namespaces (=1 app), but really 2 app (so I can shutdown customers and keep admin access for example). But, because the logic/model is the same, and some conf too, I would like to keep it in one directory (a rails 3 app folder). In rails 3, the app is a rack app, we have :

## module XXXX class Application \< Rails::Application …

## So I was thinking of doing 2 app like this inside my application.rb

module XXXCustomers  
class Application \< Rails::Application  
…

## module XXXAdmin class Application \< Rails::Application …

I could define the path for controllers and views  
{controllers,views}/admin â€” {controllers,views}/customers

My questions/problems are

- when I start the server how to tell it to start the admin app or the  
customers app. Maybe a rake parameter ?
- is there other people who had try to do this
- would you recommend me to use a different manner. For ex : share only  
the model between 2 “real” app
- any other suggestions

Thanks

* * *

Nicolas
