# Develop multiple apps simultaneously how?

**URL:** <https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664>\
**Category:** Rails\
**Created:** [March 11, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664 "2006-03-11T19:10:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 11, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/1 "2006-03-11T19:10:13Z")

</div>

Hi,

I am very early into reading the “Agile Web D. with Rails”  
book, so this will be a very basic question:

I tried starting another app simultaneously with the “depot” app, but  
when I, after creating the database and the stub project try to start  
the server, it tells me that the port is in use (of course it is, by the  
depot application!). Can I tell the server to use a different port so  
that I can play with multiple apps simultaneously?

Thanks!  
Ingo

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 11, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/2 "2006-03-11T19:15:40Z")

</div>

On Sat, 2006-03-11 at 19:10 +0100, Ingo W. wrote:

> Hi,
> 
> I am very early into reading the “Agile Web D. with Rails”  
> book, so this will be a very basic question:
> 
> I tried starting another app simultaneously with the “depot” app, but  
> when I, after creating the database and the stub project try to start  
> the server, it tells me that the port is in use (of course it is, by the  
> depot application!). Can I tell the server to use a different port so  
> that I can play with multiple apps simultaneously?

* * *

ruby script/server -p 3001

Craig

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 12, 2006, 1:31am UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/3 "2006-03-12T01:31:12Z")

</div>

> ruby script/server -p 3001

Thanks, Craig!

Trange, but when I run the above command, the server seems to still try  
to use port 3000:

ruby script/server -p 3001  
=\> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Call with -d to detach (requires absolute paths in  
config/lighttpd.conf)  
=\> Ctrl-C to shutdown server (see config/lighttpd.conf for options)  
2006-03-12 01:27:57: (network.c.265) can’t bind to port 3000 Address  
already in use

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 12, 2006, 1:59am UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/4 "2006-03-12T01:59:34Z")

</div>

That error happens because you have installed lighttpd.

You must tell the application to use webrick by:

ruby script/server webrick -p 3001

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 12, 2006, 5:04am UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/5 "2006-03-12T05:04:51Z")

</div>

> hmm, sounds buggy. Shouldn’t -p get passed on to lighttpd in this  
> case? Or is that not possible?

if you are using lighttpd, a simple solution not involving extra ports  
or hostnames is changing up the root path

\_\_\_lighttpd.conf:

$HTTP[“url”] =~ “^/a1” {  
server.document-root = “/var/www/a1/public/”  
alias.url = ( “/sbs/” =\> “/var/www/a1/public/” )  
server.error-handler-404 = “/dispatch.fcgi”  
fastcgi.server = ( “.fcgi” =\>  
( “localhost” =\>  
(  
“min-procs” =\> 1,  
“max-procs” =\> 1,  
“socket” =\> “/var/www/a1/log/fcgi.socket”,  
“bin-path” =\> “/var/www/a1/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “development” )  
)  
)  
)  
}  
\_\_config/:  
ActionController::AbstractRequest.relative\_url\_root = “/a1”

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 12, 2006, 8:57am UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/6 "2006-03-12T08:57:44Z")

</div>

> hmm, sounds buggy. Shouldn’t -p get passed on to lighttpd in this  
> case? Or is that not possible?

I think the server command only works with WEBrick. If you’re on  
lightTPD, look for this line in /config/lighttpd.conf:

server.port = 3000

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [March 12, 2006, 2:48am UTC](https://www.ruby-forum.com/t/develop-multiple-apps-simultaneously-how/54664/7 "2006-03-12T02:48:15Z")

</div>

2006/3/12, Roland [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> That error happens because you have installed lighttpd.

hmm, sounds buggy. Shouldn’t -p get passed on to lighttpd in this  
case? Or is that not possible?

Douglas
