unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Daniel Condomitti <daniel@condomitti.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Confused about restart/upgrade w. bundler and symlinks
Date: Wed, 23 Oct 2013 10:18:23 -0700	[thread overview]
Message-ID: <2B64FF31843E4699AB84F49377A69B11@condomitti.com> (raw)
In-Reply-To: <20131023160208.GA9878@dcvr.yhbt.net>



On Wednesday, October 23, 2013 at 9:02 AM, Eric Wong wrote:

> Carlos Peñas <theistian@gmx.com (mailto:theistian@gmx.com)> wrote:
> > Hi.
> >  
> > I'm having an issue using unicorn with bundler on a rails ap deployed by
> > capistrano
> >  
> > Im using bundler 1.3.5 (tried 1.4rc0 also) I'm deploying with
> > capistrano, version is irrelevant, the issue hit me when keep releases
> > is reached and 'current' symlink where "bundle unicorn" process was
> > initially started.
> >  
> > Im using also unicorn 4.6.3 and ruby 2.0.0, it is a Rails 4 app runing
> > on linux 3.2 64
> >  
> > I'm restarting with a init.d script which sends a HUP to master (restart) or USR2 (upgrade)
> >  
> > bundled gems are vendorized and stored in a shared location between
> > deploys. pids and logs also.
> >  
> > In the config have lines for:
> >  
> > Unicorn::HttpServer::START_CTX[0] pointing to the binary in the bundle
>  
> Actually, I'm not 100% sure if that's correct
> I'll let somebody who uses bundler correct me, but you *might* need
> to use something like this instead:
>  
> start_ctx = Unicorn::HttpServer::START_CTX
> start_ctx[0] = "bundle"
> start_ctx[:argv] = %w(exec unicorn).concat(start_ctx[:argv])

I point to the binary in the bundled gemset using rubygems 1.8.24 and bundler 1.4.0pre1. This works for me while only keeping two releases around

Unicorn::HttpServer::START_CTX[0] = "/opt/app/application-name/current/vendor/bundle/ruby/2.0.0/bin/unicorn
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

      reply	other threads:[~2013-10-23 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  8:35 Confused about restart/upgrade w. bundler and symlinks Carlos Peñas
2013-10-23 16:02 ` Eric Wong
2013-10-23 17:18   ` Daniel Condomitti [this message]

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=2B64FF31843E4699AB84F49377A69B11@condomitti.com \
    --to=daniel@condomitti.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).