gpt4 book ai didi

windows - Ruby 在 Windows 上崩溃

转载 作者:可可西里 更新时间:2023-11-01 13:08:01 25 4
gpt4 key购买 nike

我面临着此处描述的相同问题: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]

最佳答案

...除了安装程序现在也是崩溃的 1.9.2-p290

解决方法:

添加(或更改)

config.log_level = :warn

在 config/environments/development.rb 中

(不是我的解决方案 - 在另一个线程中找到它)

关于windows - Ruby 在 Windows 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5087432/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com