我的彪马配置:
path = Dir.pwd + "/tmp/puma/"
threads 0,20
environment "production"
daemonize true
drain_on_shutdown true
bind "unix://" + path + "socket/puma.sock"
pidfile path + "pid/puma.pid"
state_path path + "pid/puma.state"
我的环境/production.rb
MyApp::Application.configure do
config.log_level = :debug
end
我启动我的服务器:
starkers@ubuntu:~/Desktop/myspp$ pumactl -F config/puma.rb start
=> Booting Puma
=> Rails 4.0.2 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
* development - set it to false
* test - set it to false (unless you use a tool that preloads your test environment)
* production - set it to true
Puma 2.8.2 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:3000
我浏览我的应用程序。我的 log/production.log 是空白的。不知道为什么?
目录访问权限0777
贯穿我的整个应用程序。
不知道是什么原因造成的。真的需要日志(显然)。在本地和远程发生,因此与我的配置有关。但是我不确定是什么配置。puma/ubuntu/rails 中有什么可能导致这种情况的吗?
development.log 完美运行。
我已将 development.rb 复制粘贴到 production.rb 文件中。字面意思相同。好的?相同的 development.rb 和 production .rb 然而:RAILS_ENV=development rails s
填充 development.log
和
RAILS_ENV=production rails s
让 production.log 和 Kim Kardashian 的脑袋一样空荡荡。