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:
http://en.wikipedia.org/wiki/Launchd

I'd just use lighttpd+fcgi with a single dispatcher, setting up a  
launchd item like Dan Benjamin's post:
http://www.hivelogic.com/narrative/articles/lighttpd_launchd_item

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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to