ruby-on-rails - 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'
我在任何地方都没有发现类似的错误。我不知道该怎么做。
解决方案
推荐阅读
- java - 如何解决 Tomcat 7.0.100 上的 javax.net.ssl.SSLHandshake 异常错误?
- javascript - 当子组件更改时,React App 类不会呈现
- internationalization - 如何配置 MVC portlet 以使用 Language_forCustomer.properties 中的键?
- javascript - browserify 不工作,Uncaught ReferenceError: require is not defined
- reactjs - 反应我想知道如何跳转到单个页面中的文本
- firebase - 为什么当我导航到另一个屏幕时底部选项卡仍然可见?
- laravel - Laravel belongsToMany 在同一张桌子上:如何创建对称关系?
- javascript - 使用 json 和 javascript 创建文件夹树
- firebase - 如何从 Firebase 在 Flutter 中创建下拉菜单以保存文档 ID
- google-tag-manager - 如何使用数据层触发谷歌标签管理器自定义事件