由于向后移植错误的文件描述符,Windows puma 无法加载应用程序 [英] Windows puma unable to load application due to backports Bad File descriptor

查看:58
本文介绍了由于向后移植错误的文件描述符,Windows puma 无法加载应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Windows 8 机器上运行 puma 项目,但每当我尝试运行 bundle puma exec -p 4567 时,我都会收到此错误消息,我在向后移植代码的一部分中收到有关错误文件描述符的错误.

I'm trying to run a puma project on my Windows 8 machine and keep getting this error whenever I try to run bundle puma exec -p 4567 I get an error about a Bad file descriptor in part of the backports code.

PS C:\Users\andrew\work\test> bundle exec puma -p 4567
DL is deprecated, please use Fiddle
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 2.9.1 (ruby 2.0.0-p576), codename: Team High Five
* Min threads: 0, max threads: 16
* Environment: development
! Unable to load application
C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1.9.1/io/open.
rb:2:in `close': Bad file descriptor - C:/Ruby200/lib/ruby/gems/2.0.0/gems/backp
orts-3.4.0/lib/backports/1.9.1/io/open.rb (Errno::EBADF)
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.1/io/open.rb:2:in `open'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.1/io/open.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:22:in `block in require_relative_dir'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:21:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:21:in `require_relative_dir'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.1/io.rb:3:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:22:in `block in require_relative_dir'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:21:in `each'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:21:in `require_relative_dir'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.1.rb:3:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.2.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.3.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/1
.9.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/2
.0.0.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/2
.0.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/2
.1.0.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/2
.1.rb:2:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports/t
ools.rb:328:in `require_with_backports'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.4.0/lib/backports.r
b:3:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-contrib-1.4.2/lib/sinat
ra/capture.rb:3:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-contrib-1.4.2/lib/sinat
ra/capture.rb:3:in `<top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-contrib-1.4.2/lib/sinat
ra/content_for.rb:2:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-contrib-1.4.2/lib/sinat
ra/content_for.rb:2:in `<top (required)>'
        from C:/Users/andrew/work/youcue/routes.rb:2:in `require'
        from C:/Users/andrew/work/youcue/routes.rb:2:in `<top (required)>'
        from config.ru:3:in `require'
        from config.ru:3:in `block in <main>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:
55:in `instance_eval'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:
55:in `initialize'
        from config.ru:in `new'
        from config.ru:in `<main>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:
49:in `eval'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:
49:in `new_from_string'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:
40:in `parse_file'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.9.1/lib/puma/configurati
on.rb:96:in `app'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.9.1/lib/puma/runner.rb:1
13:in `load_and_bind'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.9.1/lib/puma/single.rb:7
3:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.9.1/lib/puma/cli.rb:499:
in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.9.1/bin/puma:10:in `<top
 (required)>'
        from C:/Ruby200/bin/puma:23:in `load'
        from C:/Ruby200/bin/puma:23:in `<main>'

我正在使用红宝石 2.0.0p576 (2014-09-19) [i386-mingw32]DevKit-mingw64-32-4.7.2-20130224

I'm using ruby 2.0.0p576 (2014-09-19) [i386-mingw32] DevKit-mingw64-32-4.7.2-20130224

我能够成功运行安装(必须安装 ssl 标头才能使其工作),但是当我尝试部署 puma 服务器时,我不断收到此错误.我对 ruby​​ 开发还很陌生,所以我不确定我可以研究哪些其他的东西,或者如何解决 gem 中的 EBADF 错误.

I was able to successfully run install (had to install the ssl headers to get it to work), but I keep getting this error when I try to deploy the puma server. I'm pretty new to ruby development, so I'm unsure what other things I could look into or how to resolve the EBADF error in a gem.

谢谢!

推荐答案

此问题已在最新版本的 Backports (3.6.1) 中根据 问题 86.要么需要 3.6.1 要么回到 p481

This is fixed in the latest release of Backports (3.6.1) per issue 86. Either require 3.6.1 or go back to p481

这篇关于由于向后移植错误的文件描述符,Windows puma 无法加载应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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