unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Stan Pitucha <stan.pitucha@envato.com>
Cc: unicorn-public@bogomips.org, Jeremy Evans <code@jeremyevans.net>
Subject: Re: Issues after 5.5.0 upgrade
Date: Wed, 6 Mar 2019 02:48:52 +0000	[thread overview]
Message-ID: <20190306024852.wjnigwzjmsmx4noo@dcvr> (raw)
In-Reply-To: <CAJ2_uEPifcv_ux4sX=t0C4zHTHGhqVfcLcSB2kTU3Rb_6pQ3nw@mail.gmail.com>

Stan Pitucha <stan.pitucha@envato.com> wrote:
> Hi, I'm running into two issues after an upgrade from 5.4.1 (a few

I only saw one issue (proposed fix below).
Did you forget to write about the other?

> previous versions worked just fine as well). I've got a rails 5.2 app
> started via:
> 
> bin/unicorn_rails -E development -c config/unicorn.rb
 
> With the minimal config.ru in place (require environment, run app), I get:
> 
> I, [2019-03-06T12:28:44.393406 #43714]  INFO -- : Refreshing Gem list
> ArgumentError: wrong number of arguments (given 0, expected 2)

It looks like the breakage was introduced in
commit 5985dd50a9bd72388dd5ca4886d6dffc083f87d4
("Support default_middleware configuration option")

Does this trivial change to unicorn_rails fix it for you?

diff --git a/bin/unicorn_rails b/bin/unicorn_rails
index ea4f822..558dd0b 100755
--- a/bin/unicorn_rails
+++ b/bin/unicorn_rails
@@ -136,7 +136,7 @@ def rails_builder(ru, op, daemonize)
     # 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)
 
     # Load Rails and (possibly) the private version of Rack it bundles.
     begin

If it's local, you can just edit
/Users/viraptor/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/unicorn-5.5.0/bin/unicorn_rails
No need to bother with building a gem.


Fwiw, "unicorn_rails" was only intended for Rails 1.x and 2.x.
Rails >= 3.x can use "unicorn" directly.  But "unicorn_rails"
still needs to be fixed on our end because I can't tolerate
breaking changes to existing deployment scripts.

  reply	other threads:[~2019-03-06  2:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06  1:47 Issues after 5.5.0 upgrade Stan Pitucha
2019-03-06  2:48 ` Eric Wong [this message]
2019-03-06  4:07   ` Stan Pitucha
2019-03-06  4:44     ` Eric Wong
2019-03-06  5:57       ` Jeremy Evans
2019-03-06  7:27         ` Stan Pitucha
2019-03-07  2:28           ` [PATCH] unicorn_rails: fix regression with Rails >= 3.x in app build Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190306024852.wjnigwzjmsmx4noo@dcvr \
    --to=e@80x24.org \
    --cc=code@jeremyevans.net \
    --cc=stan.pitucha@envato.com \
    --cc=unicorn-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).