Capistrano+mongrel struggles

Hello,

I am trying to deploy on to OS X Server with capistrano+mongrel+apache2,
etc.

I’m trying to do a “cap cold_deploy” as recommended here:

http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/

I had a devil of a time getting cap to find the mongrel_rails command
(which is in /opt/local/bin) on the server. I set the path in the
.profile. I set it in /etc/profile. I rebooted the server. I set the
~/.ssh/environment as recommended here:

http://blog.nanorails.com/articles/2006/07/11/installing-rails-on-mac-os-x-tiger

to the following:

PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

Still nothing. I even went so far as to hardcode the path to
/opt/local/bin/mongrel_rails everywhere I could find "mongrel_rails in
the code: (the following two files on both my dev box and the server)

/opt/local/lib/ruby/gems/1.8/gems/mongrel_cluster-0.2.0/lib/mongrel_cluster/init.rb
/opt/local/lib/ruby/gems/1.8/gems/mongrel_cluster-0.2.0/lib/mongrel_cluster/recipes.rb

This worked somewhat.

I know I should not hardcode the path and believe me if that fixed it I
would submit a patch that parameterized it just the way I can use set
:cvs, “/path/to/cvs” in the deploy.rb.

Okay, so then it started complaining that it could not start because the
log path was invalid. Default is log/mongrel.log. Well fooey. I
hardcoded that to be: /Users/me/MyApp/current/log/mongrel.log

Then I had to do the same for the docroot because it could not find
‘public’.

Now, it appears to start the mongrel servers:

  • executing task spinner
  • executing task start_mongrel_cluster
  • executing “sudo /opt/local/bin/mongrel_rails cluster::start -C
    /Users/me/MyApp/current/config/mongrel_cluster.yml”
    servers: [“www.myserver.com”]
    [www. myserver.com] executing command
    ** [out :: www. myserver.com] Starting 3 Mongrel servers…
    command finished

Looks good, right? Wrong.

There are no files in the log dir – no .pids and no mongrel.log – and
there are no mongrel processes running and nothing listening on 8000.

Even when I run the command by hand, it exits and there is no new
process running.

/opt/local/bin/mongrel_rails start -d -e production -p 8000 -l
/Users/me/MyApp/current/log/mongrel.log -P
/Users/me/MyApp/current/log/mongrel.8000.pid

Anyone have any idea what the issue could be?

Very Much Appreciated,

Steven

Does anybody know why Mongrel would just pretend to start and then exit
without a trace?

Steven

Steven Talcott S. wrote:

Hello,

I am trying to deploy on to OS X Server with capistrano+mongrel+apache2,
etc.

[…backstory deleted…]

Now, it appears to start the mongrel servers:

  • executing task spinner
  • executing task start_mongrel_cluster
  • executing “sudo /opt/local/bin/mongrel_rails cluster::start -C
    /Users/me/MyApp/current/config/mongrel_cluster.yml”
    servers: [“www.myserver.com”]
    [www. myserver.com] executing command
    ** [out :: www. myserver.com] Starting 3 Mongrel servers…
    command finished

Looks good, right? Wrong.

There are no files in the log dir – no .pids and no mongrel.log – and
there are no mongrel processes running and nothing listening on 8000.

Even when I run the command by hand, it exits and there is no new
process running.

/opt/local/bin/mongrel_rails start -d -e production -p 8000 -l
/Users/me/MyApp/current/log/mongrel.log -P
/Users/me/MyApp/current/log/mongrel.8000.pid

Anyone have any idea what the issue could be?

Very Much Appreciated,

Steven

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs