Forum: Rails deployment Local deployment of Rails applications on Mac OS X Tiger?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nick Berveiler (Guest)
on 2007-04-03 01:05
I have been using Ruby on Rails for about 6 months now using the
hivelogic instructions found at
http://hivelogic.com/narrative/articles/ruby_rails...
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
Tim L. (Guest)
on 2007-04-03 02:13
(Received via mailing list)
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/lightt...

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
aurelian (Guest)
on 2007-04-03 10:01
(Received via mailing list)
Hi,

On 4/3/07, Tim L. <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:
> http://en.wikipedia.org/wiki/Launchd
>
[...]

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

--
Aurelian

Web: http://www.locknet.eu
This topic is locked and can not be replied to.