The following warning appears in the NGINX error log for a production run Rails app:
App 15059 stderr: Rails Error: Unable to access log file. Please ensure that /var/www/ood/apps/sys/dashboard/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/www/ood/apps/sys/dashboard/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
This is because in RAILS_ENV=production we actually write the log to STDOUT instead of a log file. But this doesn't stop Rails from attempting to create this file and raising an error because the user doesn't have permissions.
This is a harmless warning, but may cause confusion for a sys admin. Ideally we would want to suppress this message if at all possible.
The following warning appears in the NGINX error log for a production run Rails app:
This is because in
RAILS_ENV=production
we actually write the log toSTDOUT
instead of a log file. But this doesn't stop Rails from attempting to create this file and raising an error because the user doesn't have permissions.This is a harmless warning, but may cause confusion for a sys admin. Ideally we would want to suppress this message if at all possible.