unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / 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
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

             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 ` 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

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 unicorn-public unicorn-public/ https://yhbt.net/unicorn-public \
		unicorn-public@yhbt.net unicorn-public@bogomips.org mongrel-unicorn@rubyforge.org mongrel-unicorn-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
	public-inbox-index unicorn-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	../../unicorn.git

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git