unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Michael Guterl <mguterl@gmail.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: unicorn, rails, and symlinked deployment
Date: Wed, 18 Nov 2009 10:34:38 -0500	[thread overview]
Message-ID: <944a03770911180734m635549c9ua2efe5ef5b881b36@mail.gmail.com> (raw)
In-Reply-To: <20091117222023.GA24006@dcvr.yhbt.net>

On Tue, Nov 17, 2009 at 5:20 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Michael Guterl <mguterl@gmail.com> wrote:
>> First let me say thanks for Unicorn, it has helped us fill a gap that
>> Passenger could not fill.
>>
>> Like many using Rails, we use capistrano for deployment.  At the end
>> of each deployment we use the standard capistrano deploy:cleanup task
>> to remove old releases.  Everything is fine until we cleanup the
>> release directory from which unicorn_rails was originally launched.
>> When this happens we get an error in our unicorn error log.
>>
>> reloading config_file=/home/deploy/public_html/rm/releases/20091116213921/config/unicorn.rb
>> error reloading
>> config_file=/home/deploy/public_html/rm/releases/20091116213921/config/unicorn.rb:
>> Errno::ENOENT No such file or directory -
>> /home/deploy/public_html/rm/releases/20091116213921/config/unicorn.rb
>>
>> I'm sure I'm not the only who has experienced this.  Does anyone have
>> any recommendations for handling this situation?
>
> Hi Michael,
>
> Unicorn was definitely implemented with Cap in mind.  Which version of
> Unicorn are you running?  0.94.0 got better symlink detection for
> non-GNU/Linux systems, so if you start in
> /home/deploy/public_html/rm/current, then it should detect it and use
> /home/deploy/public_html/rm/current/config/unicorn.rb.
>
I am using unicorn v0.94.0 on Ubuntu 8.04.

> If you don't start in your "current" symlink dir, 0.94.0 also got
> support for "working_directory" in your config file.
>
I set this option in my config, however, it did not help.

After some experimentation I realized the problem is in the script I
use for managing unicorn via /etc/init.d --
http://gist.github.com/237953

Essentially start does this:

cd ~/public_html/rm/current
unicorn_rails -D -E production -c config/unicorn.rb

I determined the -c config/unicorn.rb was the problem.  If I change it to:

unicorn_rails -D -E production -c ~/public_html/rm/current/config/unicorn.rb

everything works fine.

My updated init script is located at http://gist.github.com/237958 and
it seems to work fine.

Best regards,
Michael Guterl
_______________________________________________
mongrel-unicorn mailing list
mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn

  reply	other threads:[~2009-11-18 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 17:50 unicorn, rails, and symlinked deployment Michael Guterl
2009-11-17 22:08 ` Michael Guterl
2009-11-17 22:20 ` Eric Wong
2009-11-18 15:34   ` Michael Guterl [this message]
2009-11-18 17:21     ` Eric Wong
2009-11-18 19:47       ` Michael Guterl
2009-11-19  1:05         ` Eric Wong
2009-11-19  1:46           ` Eric Wong
2009-11-19  2:36             ` Michael Guterl
2009-11-19  1:51       ` Eric Wong
2009-11-19  2:45         ` Michael Guterl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=944a03770911180734m635549c9ua2efe5ef5b881b36@mail.gmail.com \
    --to=mguterl@gmail.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).