# Local deployment of Rails applications on Mac OS X Tiger?

**URL:** <https://www.ruby-forum.com/t/local-deployment-of-rails-applications-on-mac-os-x-tiger/90912>\
**Category:** Deployment\
**Created:** [April 2, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/local-deployment-of-rails-applications-on-mac-os-x-tiger/90912 "2007-04-02T23:05:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Berveiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/5fc32e/32.png) [@Nick\_Berveiler](https://www.ruby-forum.com/u/Nick_Berveiler)\
**Post date:** [April 2, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/local-deployment-of-rails-applications-on-mac-os-x-tiger/90912/1 "2007-04-02T23:05:44Z")

</div>

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

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

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

---

<div class="post-metadata">

**Author:** ![Nick\_Berveiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/5fc32e/32.png) [@Nick\_Berveiler](https://www.ruby-forum.com/u/Nick_Berveiler)\
**Post date:** [April 3, 2007, 12:13am UTC](https://www.ruby-forum.com/t/local-deployment-of-rails-applications-on-mac-os-x-tiger/90912/2 "2007-04-03T00:13:56Z")

</div>

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:

> **[launchd](https://en.wikipedia.org/wiki/Launchd)**
>
> launchd is an init and operating system service management daemon created by Apple Inc. as part of macOS to replace its BSD-style init and SystemStarter. There have been efforts to port launchd to FreeBSD and derived systems.
> There are two main programs in the launchd system: launchd and launchctl.
> launchd manages the daemons at both a system and user level. Similar to xinetd, launchd can start daemons on demand. Similar to watchdogd, launchd can monitor daemons to make sure that they keep r...

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

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

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

---

<div class="post-metadata">

**Author:** ![Nick\_Berveiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/5fc32e/32.png) [@Nick\_Berveiler](https://www.ruby-forum.com/u/Nick_Berveiler)\
**Post date:** [April 3, 2007, 8:01am UTC](https://www.ruby-forum.com/t/local-deployment-of-rails-applications-on-mac-os-x-tiger/90912/3 "2007-04-03T08:01:23Z")

</div>

Hi,

On 4/3/07, Tim L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 03/04/2007, at 7:05 AM, Nick Berveiler wrote:
> 
> OSX uses launchd to start and manage system processes:  
> [launchd - Wikipedia](http://en.wikipedia.org/wiki/Launchd)

[…]

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

–  
Aurelian

Web: [http://www.locknet.eu](http://www.locknet.eu)
