Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails从应用程序收到不完整的响应_Ruby On Rails_Ruby_Apache_Passenger - Fatal编程技术网

Ruby on rails Rails从应用程序收到不完整的响应

Ruby on rails Rails从应用程序收到不完整的响应,ruby-on-rails,ruby,apache,passenger,Ruby On Rails,Ruby,Apache,Passenger,ubuntu14.04.3lts(GNU/Linux 3.19.0-25-generic x86_64) ruby 1.9.3p484(2013-11-22修订版43786)[x86\u 64-linux] Rails 2.3.14 Apache/2.4.7(Ubuntu) Phusion乘客版5.0.21 App 6748 stderr: Error during failsafe response: "\xD0" from ASCII-8BIT to UTF-8 App 6748 stder

ubuntu14.04.3lts(GNU/Linux 3.19.0-25-generic x86_64)

ruby 1.9.3p484(2013-11-22修订版43786)[x86\u 64-linux]

Rails 2.3.14

Apache/2.4.7(Ubuntu)

Phusion乘客版5.0.21

App 6748 stderr: Error during failsafe response: "\xD0" from ASCII-8BIT to UTF-8
App 6748 stderr: 
[ 2015-11-20 12:58:26.6770 6711/7f2455b2f700 age/Cor/Req/Utils.cpp:96 ]: [Client 1-19] Sending 502 response: application did not send a complete response
App 6748 stderr: [ 2015-11-20 12:58:26.6772 7800/0x000000020fcf88(Worker 1) utils.rb:87 ]: *** Exception NoMethodError (You have a nil object when you didn't expect it!
App 6748 stderr: You might have expected an instance of ActiveRecord::Base.
App 6748 stderr: The error occurred while evaluating nil.[]) (process 7800, thread 0x000000020fcf88(Worker 1)):
App 6748 stderr:    from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:127:in `process_request'
App 6748 stderr:    from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:152:in `accept_and_process_next_request'
App 6748 stderr:    from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
App 6748 stderr:    from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
App 6748 stderr:    from /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
[ 2015-11-20 12:58:31.0215 6711/7f245c2fd700 age/Cor/App/Poo/AnalyticsCollection.cpp:105 ]: Process (pid=7800, group=[application_folder] (development)) no longer exists! Detaching it from
the pool.
[ 2015-11-20 12:58:31.0215 6711/7f245c2fd700 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 7800, application [application_folder] (development)
App 7852 stdout: 
我尝试将所有控制器源文件转换为UTF-8格式,并在文件开头添加
#encoding:UTF-8
。尝试将密钥添加到
app/secret.yml
,重新启动了服务器,但什么也没发生


Apache日志介绍了一些关于
ActiveRecord::Base
。但我只生成了一些模型,没有在
app/models/*

中接触文件,因为我在控制器中使用unicode simbols。
当我将
RAILS\u ROOT/app/controllers/*
中所有控制器的编码设置为
UTF-8
而不是
UTF-8(无BOM)时,所有工作正常