私のプーマ設定:
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 を空のままにします。