unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Owen Ou <o@heroku.com>
To: unicorn-public@bogomips.org
Cc: api-team <api-team@heroku.com>
Subject: undefined method `include?' for nil:NilClass (NoMethodError)
Date: Mon, 16 Nov 2015 15:43:29 -0800	[thread overview]
Message-ID: <CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com> (raw)


We recently upgraded to Unicorn 5.0 but getting the following error:

[2015-11-16T14:54:16.943652 #19838] ERROR -- : app error: undefined
method `include?' for nil:NilClass (NoMethodError)

E, [2015-11-16T14:54:16.943712 #19838] ERROR -- :
`block in http_response_write'

E, [2015-11-16T14:54:16.943737 #19838] ERROR -- :
`block in each'

E, [2015-11-16T14:54:16.943753 #19838] ERROR -- :

E, [2015-11-16T14:54:16.943767 #19838] ERROR -- :

The error came from this commit:
And specifically the line of `if value =~ /\n/` is changed to `if
value.include?("\n".freeze)`. Apparently `value` can be nil which
caused our issue. It should be an easy fix.



             reply	other threads:[~2015-11-16 23:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 23:43 Owen Ou [this message]
2015-11-17  0:27 ` undefined method `include?' for nil:NilClass (NoMethodError) 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:

  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='CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com' \
    --to=o@heroku.com \
    --cc=api-team@heroku.com \
    --cc=unicorn-public@bogomips.org \


* 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


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).