Stan Pitucha <[email protected]> wrote:
> That was indeed with `preload_app true`.
>
> The patch you posted fixed the second issue and now both `unicorn` and
> `unicorn_rails` start successfully.
Thanks both. Pushed out a pre-release with Jeremy's patch:
gem install --pre unicorn 5.5.0.1.g6836
commit 6836d0674efdb1a6b79953285f10d8edd7e20432
Will tag and release 5.5.1 final in a day or two assuming all
goes well.
------8<-------
From: Jeremy Evans <[email protected]>
Subject: [PATCH] unicorn_rails: fix regression with Rails >= 3.x in app build
Note: `unicorn_rails' was only intended for Rails <= 2.x projects
in the old days.
Fixes: 5985dd50a9bd7238 ("Support default_middleware configuration option")
From: Jeremy Evans <[email protected]>
cf.
https://bogomips.org/unicorn-public/[email protected]/
Signed-off-by: Eric Wong <[email protected]>
[ew: commit message]
---
bin/unicorn_rails | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/unicorn_rails b/bin/unicorn_rails
index ea4f822..354c1df 100755
--- a/bin/unicorn_rails
+++ b/bin/unicorn_rails
@@ -132,11 +132,11 @@ def rails_builder(ru, op, daemonize)
# this lambda won't run until after forking if preload_app is false
# this runs after config file reloading
- lambda do ||
+ lambda do |x, server|
# Rails 3 includes a config.ru, use it if we find it after
# working_directory is bound.
::File.exist?('config.ru') and
- return Unicorn.builder('config.ru', op).call
+ return Unicorn.builder('config.ru', op).call(x, server)
# Load Rails and (possibly) the private version of Rack it bundles.
begin
--
EW
--
unsubscribe: [email protected]
archive: https://bogomips.org/unicorn-public/