diff --git a/config/puma.rb b/config/puma.rb index ea8a3fc..2e621cd 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -3,21 +3,10 @@ threads threads_count, threads_count env = ENV.fetch 'RAILS_ENV', 'development' environment env - -unless Rails.root - module Rails - ROOT = Dir.pwd - - def self.root - ROOT - end - end -end - workers ENV.fetch('WORKER', 4).to_i if env == 'production' - listen = ENV.fetch('LISTEN') { 'unix://' + File.join(Rails.root, 'tmp/sockets/puma.sock') } + listen = ENV.fetch('LISTEN') { 'unix://' + File.join(Dir.pwd, 'tmp/sockets/puma.sock') } port = ENV['PORT'] else listen = ENV['LISTEN'] @@ -27,6 +16,6 @@ end port(port) if port bind listen if listen -pidfile File.join Rails.root, 'tmp/pids/puma.pid' +pidfile File.join Dir.pwd, 'tmp/pids/puma.pid' plugin :tmp_restart