Imdad <[email protected]> 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"