Reputation: 4189
I have deploy my Rails app to a VPS (Nginx + Unicorn + Postgres) using Capistrano 3, but I got an error page "we're sorry, but something went wrong." And I can't find my Rails log file, I uncommented this line in the deploy.rb, and still cannot find it.
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
There are log files in my current/log directory and shared/log/, but they don't get updated when I refresh my error page.
Any idea?
Thanks
Upvotes: 0
Views: 203
Reputation: 1230
Try doing the following:
touch /var/www/projectx/shared/log/unicorn.log
Update your unicorn.rb file with:
stderr_path "#{root}/shared/log/unicorn.log"
stdout_path "#{root}/shared/log/unicorn.log"
Reason: your log file will be reset each time you will update your repo.
Upvotes: 1