本文介绍了在Rails 4/Capistrano/Passenger/Nginx服务器上的production.log为空(数字海洋)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Ubuntu 12.04上使用Capistrano,Nginx,Passenger,Postgres,Redis/Resque设置了Rails 4服务器

I have set up a rails 4 server on Ubuntu 12.04 using Capistrano, Nginx, Passenger, Postgres, Redis/Resque

一切正常,除了production.log文件始终为空.

Everything is working great, except that the production.log file is always empty.

我尝试在production.rb中进行各种配置更改,但无济于事.

I have tried a variety of configuration changes in production.rb to no avail.

这绝对不是权限问题,因为日志目录和每个日志的权限均已打开(777)

It's definitely not a permissions issue, as the permissions on both the log dir and each of the logs are wide open (777)

有人能帮助我弄清楚如何使基本日志记录正常工作吗?

Can anyone hep me figure out how to get basic logging working?

推荐答案

罪魁祸首是 Heroku的rails_12factor 宝石

从Gemfile中删除该gem,现在日志按预期运行.

Removing that gem from the Gemfile, now the logs are working as expected.

# group :production do
#   gem 'rails_12factor'
# end

这篇关于在Rails 4/Capistrano/Passenger/Nginx服务器上的production.log为空(数字海洋)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 01:51