From 0b1e5b577b92d5956dc9b71bde2570b7410804a4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 13 Sep 2018 13:42:08 +0200 Subject: Fixup prod/dev logic in puma config, properly this time. --- config/puma.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/puma.rb b/config/puma.rb index cd7089a..619ee43 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,13 +1,15 @@ #!/usr/bin/env puma -if @config.environment.call == "production" - root = "../../shared" - socket = "unix://../../shared/tmp/sockets/puma.sock" +if @config.environment_str == "production" + root = File.expand_path('../', __FILE__) + socket = "unix://#{root}/tmp/sockets/puma.sock" else root = "." socket = "tcp://localhost:3000" end +puts "Root: #{root}" + # Store the pid of the server in the file at “path”. # pidfile "#{root}/tmp/pids/puma.pid" -- cgit v1.2.3