Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4 production.log stopped working

I have a problem with my production.log file in Rais 4.

I have deleted the file after a Capistrano deploy, i created the file again but know is always 0kb. What can i do?

Thanks.

like image 614
Luis de Haro Avatar asked Oct 02 '22 03:10

Luis de Haro


1 Answers

I was able to fix it by restarting nginx and my app's unicorn instance:

$ sudo service nginx restart
$ sudo service unicorn_appname restart

If that doesn't work try stop and start instead of restart. You also need to make sure that the app has permissions to write to the file. touch the file as the user your app uses to run in the server.

Or:

$ chown username production.log
like image 127
Sheharyar Avatar answered Oct 13 '22 22:10

Sheharyar