# Using common layout in Rails

**URL:** <https://www.ruby-forum.com/t/using-common-layout-in-rails/69858>\
**Category:** Ruby\
**Created:** [September 25, 2006, 3:00am UTC](https://www.ruby-forum.com/t/using-common-layout-in-rails/69858 "2006-09-25T03:00:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 25, 2006, 3:00am UTC](https://www.ruby-forum.com/t/using-common-layout-in-rails/69858/1 "2006-09-25T03:00:56Z")

</div>

Hello,

I’m looking at building a web management interface that will work via  
plug-in  
applications to a main framework. I was debating using multiple Rails  
applicaitons that will look, from a user perspective, like a single  
application.

To do so, I’d need to use some common layout between all of the  
applications.  
How would I specify this?

Anyone know if something like mongrel can run multiple applications at a  
time?

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 25, 2006, 11:57am UTC](https://www.ruby-forum.com/t/using-common-layout-in-rails/69858/2 "2006-09-25T11:57:52Z")

</div>

Mongrel can run multiple servlets but only a single Rails app can run  
under a Ruby interpreter at once. The only way I can think of to get  
around this would be to either do this by configuring your web server,  
setting them out in physical directories, or using Why’s sandbox  
library and writing your own startup scripts to encapsulate several  
Rails apps in different sandboxes.

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 25, 2006, 3:16pm UTC](https://www.ruby-forum.com/t/using-common-layout-in-rails/69858/3 "2006-09-25T15:16:19Z")

</div>

On 25/09/06 Timothy G. said:

> Mongrel can run multiple servlets but only a single Rails app can run  
> under a Ruby interpreter at once. The only way I can think of to get  
> around this would be to either do this by configuring your web server,  
> setting them out in physical directories, or using Why’s sandbox  
> library and writing your own startup scripts to encapsulate several  
> Rails apps in different sandboxes.

Is there a way to specify a common layout for multiple Rails apps?  
Surely  
you’re not constrained to just the layouts directory in the app itself,  
there  
must be a way to pick up a common layout outside of that structure.

Mike

---

<div class="post-metadata">

**Author:** ![Michael\_PSSoulier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Post date:** [September 26, 2006, 3:26am UTC](https://www.ruby-forum.com/t/using-common-layout-in-rails/69858/4 "2006-09-26T03:26:19Z")

</div>

Take a look at the API. You can select a base directory for the views  
and can probably use a full path. Failing that, a symlink could solve  
it.
