首页 > 解决方案 > rails s Rack 应用程序错误处理请求 { GET / } 在 Windows 上

问题描述

我在 Mac 和 Windows 上运行相同的应用程序。当我在 mac 上启动服务器时,它运行正常,当我尝试在 Windows 上运行它时,出现以下错误:

2018-07-30 20:35:30 -0300: Rack app error handling request { GET / }
#<Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - user specified timeout>
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:61:in `connect_internal'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:137:in `connect'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:227:in `each'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:227:in `foreach'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:617:in `tcp'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
2018-07-30 20:35:32 -0300: Rack app error handling request { GET /favicon.ico }
#<Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - user specified timeout>
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:61:in `connect_internal'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:137:in `connect'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:227:in `each'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:227:in `foreach'
C:/Ruby24-x64/lib/ruby/2.4.0/socket.rb:617:in `tcp'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

我在任何地方都没有发现类似的错误。我不知道该怎么做。

标签: ruby-on-railswindowsrack

解决方案


推荐阅读