【发布时间】:2011-02-23 05:47:32
【问题描述】:
我遇到了这里描述的相同问题:why-rails-fails-with-ruby-exe-has-encountered-a-problem-and-needs-to-close。即 ruby 因以下错误而崩溃:
ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
我要求这个添加一些细节,因为我没有问这个问题我无法在其中添加信息。所以这不是重复的。
无论我如何运行(在开发或生产中)Ruby 最终都会崩溃,但它似乎在生产模式下更频繁地崩溃。有时按住 F5 键时它会崩溃,但有时我必须间歇地按住并释放它一两分钟。它似乎非常依赖于时间,但我通常可以在不到 60 秒的时间内让它崩溃。
当我刷新 GET 请求时发送 3 次如下:
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as HTML
Rendered pms/dashboard.html.erb within layouts/application (109.4ms)
Completed 200 OK in 141ms (Views: 140.6ms | ActiveRecord: 0.0ms)
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as */*
Rendered pms/dashboard.html.erb within layouts/application (15.6ms)
Completed 200 OK in 187ms (Views: 187.5ms | ActiveRecord: 0.0ms)
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as */*
Rendered pms/dashboard.html.erb within layouts/application (15.6ms)
Completed 200 OK in 219ms (Views: 218.7ms | ActiveRecord: 0.0ms)
如果我快速刷新页面,在 3 个请求中的一个或所有请求中会出现以下错误:
ERROR Errno:ECONNABORTED: An established connection was aborted by the software in your host machine:
c:/Ruby/lib/1.9.1/webrick/httpresponse.rb:323:in 'write'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:323:in '<<'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:323:in '_write_data'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:295:in 'send_body_string'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:186:in 'send_body'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:103:in 'send_response'
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:86:in 'run'
ERROR Errno:ECONNABORTED: An established connection was aborted by the software in your host machine:
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:56:in 'eof?'
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:56:in 'run'
c:/Ruby/lib/1.9.1/webrick/server.rb:183:in 'block in start_thread'
INFO going to shutdown....
INFO WEBrick::HTTPServer#start done
我何时开始收到此错误? 当我在我的项目中添加图像、css 和 javascript 时,我开始收到此错误。我还尝试删除这 3 个中的一个,看看是谁导致了错误,但每次我的 ruby.exe 崩溃时,我都会看到错误:
ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
我该如何解决这个问题?
当我启动服务器时,控制台上会打印以下内容:
=>Booting WEBrick
=>Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=>Call with -d to detach
=>Ctrl-C to shutdown server
[2011-02-23 10:59:22] INFO WEBrick 1.3.1
[2011-02-23 10:59:22] INFO ruby 1.9.2 (2010-08-18) [i386-mingw32]
[2011-02-23 10:59:22] INFO WEbrick::HTTPServer#start: pid:2448 port=3000
ruby -v的输出
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
【问题讨论】:
标签: windows ruby-on-rails-3 crash