Hello,
I am not usually a ruby developer, and I just recently stumbled across
an odd bug, that only someone who didn¹t know what they were doing would
stumble across. I am honestly not sure if this really counts as a bug,
but I thought I should let you know.
unicorn/lib/unicorn.rb line 62 is:
pp({ :inner_app => inner_app }) if $DEBUG
Nowhere in the file is there require Œpp¹
This is not an issue if you run "unicorn -d config.ru², but If you
manually set $DEBUG = true, which I foolishly did because I didn¹t
realize that $DEBUG was a special variable in ruby, you get an undefined
method error.
I will be changing my code to use a different variable name, however I am
not sure if there are valid reasons to manually set $DEBUG in ruby. If
there are, this may be an issue for others.
I think the simplest solution would be to replace the line above with an
if block:
if $DEBUG
require 'pp'
pp({ :inner_app => inner_app })
end
Similar blocks appear in unicorn/bin/unicorn and
unicorn/bin/unicorn_rails. I am assuming the one in unicorn/bin/unicorn
is the one that allows it to work when using the -d flag. If there really
is never any reason to manually set $DEBUG I¹m sorry I wasted your time.
In any case, thank you for Unicorn!
Jim Robinson
------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error,
please immediately notify the sender by e-mail at the address shown.
This email transmission may contain confidential information. This
information is intended only for the use of the individual(s) or entity to
whom it is intended even if addressed incorrectly. Please delete it from
your files if you are not the intended recipient. Thank you for your
compliance. Copyright (c) 2017 Cigna
==============================================================================
--
unsubscribe: [email protected]
archive: https://bogomips.org/unicorn-public/