rails_admin:安装失败 - 错误的文件描述符错误

如何解决rails_admin:安装失败 - 错误的文件描述符错误

我正在尝试使用 rails_admin gem,但是当我运行命令 rails g rails_admin:install 时,我收到了错误文件描述符错误。见下文。关于如何修复的任何想法?

 C:/Ruby27-x64/lib/ruby/2.7.0/reline/ansi.rb:120:in `raw': Bad file descriptor (Errno::EBADF)
    from C:/Ruby27-x64/lib/ruby/2.7.0/reline/ansi.rb:120:in `cursor_pos'
    from C:/Ruby27-x64/lib/ruby/2.7.0/reline.rb:349:in `may_req_ambiguous_char_width'
    from C:/Ruby27-x64/lib/ruby/2.7.0/reline.rb:208:in `inner_readline'
    from C:/Ruby27-x64/lib/ruby/2.7.0/reline.rb:188:in `readline'
    from C:/Ruby27-x64/lib/ruby/2.7.0/forwardable.rb:235:in `readline'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/line_editor/readline.rb:20:in `readline'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb:7:in `readline'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/shell/basic.rb:439:in `ask_simply'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/shell/basic.rb:85:in `ask'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/shell.rb:60:in `ask'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/lib/generators/rails_admin/utils.rb:13:in `ask_for'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/lib/generators/rails_admin/install_generator.rb:13:in `install'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `block in invoke_all'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `each'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `map'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `invoke_all'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/group.rb:232:in `dispatch'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.1.1/lib/rails/generators.rb:275:in `invoke'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.1.1/lib/rails/commands/generate/generate_command.rb:26:in `perform'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.1.1/lib/rails/command/base.rb:69:in `perform'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.1.1/lib/rails/command.rb:50:in `invoke'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.1.1/lib/rails/commands.rb:18:in `<main>'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
    from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
    from bin/rails:4:in `<main>'

系统规格:

  • Windows 10 x64
  • Ruby 2.7.2p137
  • Rails 6.1.1

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?