# Capistrano+mongrel struggles

**URL:** <https://www.ruby-forum.com/t/capistrano-mongrel-struggles/101009>\
**Category:** Rails\
**Created:** [August 2, 2006, 7:30pm UTC](https://www.ruby-forum.com/t/capistrano-mongrel-struggles/101009 "2006-08-02T19:30:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sshingler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@sshingler](https://www.ruby-forum.com/u/sshingler)\
**Post date:** [August 2, 2006, 7:30pm UTC](https://www.ruby-forum.com/t/capistrano-mongrel-struggles/101009/1 "2006-08-02T19:30:24Z")

</div>

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/](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](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](http://www.myserver.com)”]  
[www. [myserver.com](http://myserver.com)] executing command  
\*\* [out :: www. [myserver.com](http://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

---

<div class="post-metadata">

**Author:** ![sshingler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@sshingler](https://www.ruby-forum.com/u/sshingler)\
**Post date:** [August 4, 2006, 4:18pm UTC](https://www.ruby-forum.com/t/capistrano-mongrel-struggles/101009/2 "2006-08-04T16:18:40Z")

</div>

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](http://www.myserver.com)”]  
> [www. [myserver.com](http://myserver.com)] executing command  
> \*\* [out :: www. [myserver.com](http://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
