From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0D9911FB0B; Fri, 24 Oct 2014 18:13:01 +0000 (UTC) Date: Fri, 24 Oct 2014 18:13:00 +0000 From: Eric Wong To: Imdad Cc: unicorn-public Subject: Re: Having issue with Unicorn Message-ID: <20141024181300.GA29311@dcvr.yhbt.net> References: <20141024174520.GA27334@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: Imdad wrote: > Thanks Eric, here is my deploy.rb and config/unicorn.rb > NOTE: /releases/6 and /releases/28 both have same error message > > config/unicorn.rb > ============== > # Set your full path to application. > app_dir = File.expand_path('../../', __FILE__) > shared_dir = File.expand_path('../../../shared/', __FILE__) Using __FILE__ with File.expand_path here gets you in trouble because it loses track of symlinks like "current" The following should be more explicit, I think: app_dir = "/var/www/hailisys/current" shared_dir = "/var/www/hailisys/shared" And the rest of the config/unicorn.rb should pick those up as-is. > set :deploy_to, '/var/www/hailisys' Maybe you can export :deploy_to from your deploy config to your unicorn invocation to DRY-up your config/unicorn.rb config. So perhaps, something like: app_dir = "#{ENV['deploy_to']}/current" shared_dir = "#{ENV['deploy_to']}/shared"