【发布时间】:2015-07-30 06:12:30
【问题描述】:
当我在开发模式下运行 rails 应用程序时,服务器日志正确显示在终端中。但是当我在生产模式下运行应用程序时,服务器没有在终端中显示任何服务器日志。并且浏览器中显示错误,例如“我们很抱歉,但出了点问题。”。我正在使用以下命令运行服务器。我正在使用瘦服务器。
rails s -e production
这是我在启动服务器时在服务器模式下获得的输出。之后,当我发出任何请求时,没有显示输出。
prashant@prashant-pc:~/client_proj/template$ rails s -e production
=> Booting Thin
=> Rails 4.1.5 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
我没有得到什么问题。
【问题讨论】:
-
在
production.rb中config.log_level设置为什么? -
config.log_level = :info
-
一旦尝试将其设置为
:debug不确定它是否会有所帮助,试一试。然后重新启动服务器并进行测试。 -
我试过但没用。仍然存在同样的问题。
-
请检查是否有必要的权限在production.log文件上创建和写入
标签: ruby-on-rails console server development-environment production