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)
Hi,
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 -- :
/home/api/vendor/bundle/ruby/2.2.0/gems/unicorn-5.0.0/lib/unicorn/http_response.rb:40:in
`block in http_response_write'
E, [2015-11-16T14:54:16.943737 #19838] ERROR -- :
/home/api/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/utils.rb:490:in
`block in each'
E, [2015-11-16T14:54:16.943753 #19838] ERROR -- :
/home/api/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/utils.rb:489:in
`each'
E, [2015-11-16T14:54:16.943767 #19838] ERROR -- :
/home/api/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/utils.rb:489:in
`each’
The error came from this commit:
https://github.com/defunkt/unicorn/commit/fb2f10e1d7a72e6787720003342a21f11b879614.
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.
Thanks,
Owen
next 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:
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='CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com' \
--to=o@heroku.com \
--cc=api-team@heroku.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).