Imdad <[email protected]> wrote:
> I have rails4, nginx, unicorn and mona for app deployed
> http://104.131.74.69/
>
> But after deploy hitting on above link results in error, and the log says
>
> root@Hailisys:~# tail -n 0 -f
> /var/www/hailisys/shared/log/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)
You're working inside /releases/28 here...
> /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)
However, it's trying to run out of /releases/6, which I assume is
old enough to be removed by now.
You should be able to set working_directory in your config/unicorn.rb:
working_directory "/var/www/hailisys/current"
Then SIGHUP to reload the config before sending SIGUSR2 to it.
Hopefully that works. Normally you shouldn't need to set
working_directory if you're working out of "/current";
but I'm not sure what your deploy environment looks like.