Updates app_dir and shared_dir as stated here then did a deploy which went
okay, but my app still not running and log spit the following...
root@Hailisys:/var/www/hailisys/shared/log# tail -n 20 -f
unicorn.stderr.log
I, [2014-10-24T17:28:53.162084 #15819] INFO -- : executing
["/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn", "-c",
"/var/www/hailisys/current/config/unicorn.rb", "-D", "-E", "production",
{11=>#<Kgio::UNIXServer:fd 11>}] (in /var/www/hailisys/releases/28)
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:475:in
`exec': No such file or directory -
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn
(Errno::ENOENT)
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:475:in
`block in reexec'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:447:in
`fork'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:447:in
`reexec'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:307:in
`join'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in
`<top (required)>'
from
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in
`load'
from
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in
`<main>'
E, [2014-10-24T17:28:53.440532 #8814] ERROR -- : reaped #<Process::Status:
pid 15819 exit 1> exec()-ed
I, [2014-10-24T18:21:54.882454 #16594] INFO -- : executing
["/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn", "-c",
"/var/www/hailisys/current/config/unicorn.rb", "-D", "-E", "production",
{11=>#<Kgio::UNIXServer:fd 11>}] (in /var/www/hailisys/releases/29)
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:475:in
`exec': No such file or directory -
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn
(Errno::ENOENT)
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:475:in
`block in reexec'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:447:in
`fork'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:447:in
`reexec'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:307:in
`join'
from
/var/www/hailisys/current/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in
`<top (required)>'
from
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in
`load'
from
/var/www/hailisys/releases/6/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in
`<main>'
E, [2014-10-24T18:21:55.053890 #8814] ERROR -- : reaped #<Process::Status:
pid 16594 exit 1> exec()-ed
Cheers!
Imdad Ali Khan
Mob (0) 9818484057
http://www.linkedin.com/in/imdad
On 24 October 2014 23:43, Eric Wong <[email protected]> wrote:
> 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"
>