Local deployment of Rails applications on Mac OS X Tiger?

I have been using Ruby on Rails for about 6 months now using the
hivelogic instructions found at

and it has been working fine. Recently, I decided that I would like to
write some rails applications to use for my own personal use on my Mac,
but I do not want to have to run a ./script/server command every time I
want to use a rails application on my laptop. I would like to be able to
just hit a localhost URL after turning on my computer and my rails site
will “just work”. I don’t mind if I am not using port 80 since there is
already an apache server that was pre-installed on Tiger that currently
holds this port number, but I would like to be able to configure lighty
to start up and always have some of my rails applications running at all
times.

Could anyone please point me in the right direction of how I would be
able to do this? Do I need to use Capistrano to do this? Does using
Capistrano make sense? Do I need a completely different installation of
Ruby on Rails to make this happen or can I use my existing
configuration?

There is a new tutorial available on the hivelogic site that uses
mongrel, however this tutorial does not mention anything about using
rails outside of development mode so I have not made the upgrade yet. If
it were easier to use this tutorial’s ruby on rails deployment resources
than the first hivelogic tutorial, I would gladly update my environment.

I’ve been looking all over for documentation on this but I just can’t
seem to find anything at all on this subject.

Thanks,
Nick Berveiler

On 03/04/2007, at 7:05 AM, Nick Berveiler wrote:

write some rails applications to use for my own personal use on my
Mac,
but I do not want to have to run a ./script/server command every
time I
want to use a rails application on my laptop. I would like to be
able to
just hit a localhost URL after turning on my computer and my rails
site
will “just work”.

OSX uses launchd to start and manage system processes:

I’d just use lighttpd+fcgi with a single dispatcher, setting up a
launchd item like Dan Benjamin’s post:

You might want to add something like the following line to /etc/hosts
so you can use name-based virtual hosting:

myapp.local 127.0.0.1

Then in your lighttpd config:

$HTTP[“host”] == “myapp.local” {
server.document-root = “/Users/someuser/Sites/myapp/trunk”
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server= (“.fcgi” =>
(“myapp.local” =>
(
“socket” => “/Users/someuser/Sites/myapp/trunk/tmp/sockets”,
“bin-path” => “/Users/someuser/Sites/myapp/trunk/public/
dispatch.fcgi”,
“bin-environment” => (“RAILS_ENV” => “production” ),
“min-procs” => 1,
“max-procs” => 1
)
)
)
}

– tim

Hi,

On 4/3/07, Tim L. [email protected] wrote:

On 03/04/2007, at 7:05 AM, Nick Berveiler wrote:

OSX uses launchd to start and manage system processes:
launchd - Wikipedia

[…]

You can use lingon ( http://lingon.sourceforge.net/ ) as GUI for
launchd.


Aurelian

Web: http://www.locknet.eu