Hi, I am very early into reading the "Agile Web Development 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 -- Posted via http://www.ruby-forum.com/.
On Sat, 2006-03-11 at 19:10 +0100, Ingo Weiss wrote:> Hi, > > I am very early into reading the "Agile Web Development 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
> ruby script/server -p 3001Thanks, 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 => 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 -- Posted via http://www.ruby-forum.com/.
That error happens because you have installed lighttpd. You must tell the application to use webrick by: ruby script/server webrick -p 3001 -- Posted via http://www.ruby-forum.com/.
Douglas Livingstone
2006-Mar-12 01:45 UTC
[Rails] Re: develop multiple apps simultaneously how?
2006/3/12, Roland <roland_mai@hotmail.com>:> 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
> 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" -- Posted via http://www.ruby-forum.com/.
Muammar Kris Khaira
2006-Mar-12 07:54 UTC
[Rails] Re: Re: develop multiple apps simultaneously how?
> 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