Ответы пользователя по тегу Passenger
  • Связка nginx+passenger странно отдает JSON

    ertaquo
    @ertaquo Автор вопроса
    Спасибо всем за наводки, включил лог у passenger'а и в нем увидел ошибку:
    [ 2013-06-09 17:35:23.4363 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr] /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb:109:in `block in process_request': undefined method `each' for nil:NilClass (NoMethodError)
    [ 2013-06-09 17:35:23.4363 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/utils.rb:398:in `block in each'
    [ 2013-06-09 17:35:23.4363 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/utils.rb:397:in `each'
    [ 2013-06-09 17:35:23.4363 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/utils.rb:397:in `each'
    [ 2013-06-09 17:35:23.4364 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb:101:in `process_request'
    [ 2013-06-09 17:35:23.4364 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
    [ 2013-06-09 17:35:23.4364 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
    [ 2013-06-09 17:35:23.4364 23937/2b427687e700 Pool2/Implementation.cpp:1174 ]: [App 23978 stderr]       from /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
    

    В файле /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb на обозначенной строчке добавил проверку на nil и все заработало.
    Ответ написан
    Комментировать