Ruby在Windows上崩溃了

Har*_*Joy 7 windows crash ruby-on-rails-3

我面临着这里描述的同样问题:为什么 - rails-failed-with-ruby-exe-have-have-a-problem-and-need-to-close.这是ruby遇到以下错误崩溃:

ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
Run Code Online (Sandbox Code Playgroud)

我要求这个添加一些细节,因为我没有问过这个问题,我无法在其中添加信息.所以这不重复.


无论我如何运行它(在开发或生产中),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)
Run Code Online (Sandbox Code Playgroud)

如果我快速刷新页面,则在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
Run Code Online (Sandbox Code Playgroud)

当我开始得到这个错误? 当我在项目中添加图像,css和javascript时,我开始出现此错误.我也尝试删除其中一个3,看看谁导致错误,但每次我的ruby.exe崩溃,我看到错误:

ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?


当我启动服务器后,在控制台上打印:

=>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
Run Code Online (Sandbox Code Playgroud)

输出 ruby -v

ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
Run Code Online (Sandbox Code Playgroud)

小智 3

在 Windows 上运行 1.9.2 会让您成为极少数用户。如果您没有明确需要 1.9,我会使用 1.8.7。具体来说,我将使用 RailsInstaller 中的包: http: //railsinstaller.org/