Ruby在Windows上崩溃 [英] Ruby crashes on windows

查看:216
本文介绍了Ruby在Windows上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到这里描述的相同问题:的问题。这是ruby得到崩溃与以下错误:

  ruby​​.exe遇到问题,需要关闭。对此造成的不便,我们表示歉意。 

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






Ruby最终无论如何运行(开发或生产)它似乎在生产模式下更频繁崩溃。有时它会崩溃,当我按住F5键,但有时我必须持有和间歇地释放一两分钟。



刷新GET请求时发送3次,如下所示: :

 在2011-02-23 10:57:35启动GET/ app / page127.0.0.1 
由AppController处理#页面为HTML
在布局/应用程序中渲染pms / dashboard.html.erb(109.4ms)
在141ms完成200 OK(视图:140.6ms | ActiveRecord:0.0ms )


在2011-02-23开始为127.0.0.1 GET/ app / page+0530
由AppController处理#page as * / *
Rndered pms / dashboard.html.erb in layouts / application(15.6ms)
在187ms完成200 OK(视图:187.5ms | ActiveRecord:0.0ms)


在2011-02-23 10:57:35为127.0.0.1启动GET/ app / page+
由AppController#页面处理为* / *
渲染的pms / dashboard。 html.erb在layouts / application(15.6ms)
完成200 OK在219ms(视图:218.7ms | ActiveRecord:0.0ms)

如果我快速刷新页面获得以下错误在一个或所有3请求:

  ERROR Errno:ECONNABORTED:已建立的连接被主机中的软件中止:
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: _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:在'run'

错误Errno:ECONNABORTED:已建立的连接被主机中的软件中止:
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 WEBrick :: HTTPServer#start done

当我在我的项目中添加图片,css和javascript时,我开始得到这个错误。我也尝试通过删除其中的一个3,看到谁造成的错误,但每次我的ruby.exe崩溃,我看到错误:

  ruby​​.exe遇到问题,需要关闭。对此造成的不便,我们表示歉意。 

我如何解决这个问题? / p>




当我开始在控制台上打印服务器时:

  =>启动WEBrick 
=> Rails 3.0.3应用程序开始于http://0.0.0.0:3000
=>分离
=> Ctrl-C关闭服务器
[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



在配置/环境/ development.rb



(不是我的解决方案 - p>

I'm facing same problem described here: why-rails-fails-with-ruby-exe-has-encountered-a-problem-and-needs-to-close. that is ruby get crashed with following error:

ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

I'm asking this to add some details on it as that question was not asked by me I am not able to add information in it. So this is not duplicate.


Ruby crashes eventually no matter how I run it (in development or in production), but it seems to crash more often in production mode. Sometimes it will crash when I hold down the F5 key, but sometimes I have to hold and release it intermittently for a minute or two. It appears to be very dependent on timing, but I can usually make it crash in less than 60 seconds.

When I refresh the GET request is sent for 3 times as follows:

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)

And if I rapidly refresh the page get following error in one of or all the 3 request:

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

When I started to get this error? When I added images, css and javascript in my project I started to get this error. I also tried by removing one of this 3 and see who causes the error but every time my ruby.exe get crashed and i see the error:

ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

How can I solve this?


When I start server following is printed on console:

=>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

Output of ruby -v

ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

解决方案

... except the installer is now ALSO the crashing 1.9.2-p290

Workaround:

Add (or change)

config.log_level = :warn

in config/environments/development.rb

(not my solution - found it in another thread)

这篇关于Ruby在Windows上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆