ruby rhc 安装程序给出错误`没有这样的文件 dl/import`

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28896733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 06:42:04  来源:igfitidea点击:

rhc setup gives error `no such file dl/import`

rubyopenshift

提问by Vladimir Balandin

I'm installing openshift client tools as described: https://developers.openshift.com/en/getting-started-windows.html#client-tools. On step 'Setting up Your Machine' I got error:

我正在安装 openshift 客户端工具,如下所述:https: //developers.openshift.com/en/getting-started-windows.html#client-tools。在“设置您的机器”步骤中,出现错误:

rhc setup C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' : cannot load such file -- dl/import (LoadError)

rhc 设置 C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': 无法加载此类文件 -- dl/import (LoadError)

Full stack trace:

完整的堆栈跟踪:

C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:4:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:77:in `<class:Wizard>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:7:in `<module:RHC>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:6:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/base.rb:4:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/account.rb:2:in `<module:Commands>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/account.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:189:in `block in load'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:188:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:188:in `load'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/cli.rb:36:in `start'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/bin/rhc:20:in `<top (required)>'
        from C:/Ruby22-x64/bin/rhc:23:in `load'
        from C:/Ruby22-x64/bin/rhc:23:in `<main>'

I found same problem: https://groups.google.com/forum/#!topic/supmua/hPyTTamhTycIt's suggest to replace DL with Fiddle.

我发现了同样的问题:https: //groups.google.com/forum/#!topic/supmua/hPyTTamhTyc 建议用 Fiddle 替换 DL。

How I can get working rhc?

我如何才能开始工作?

回答by Vladimir Balandin

Updating net-ssh to 2.9.3.beta1, as cremnosuggested in this comment, resolved my problem.

将 net-ssh 更新到 2.9.3.beta1,如此评论中的cremno 所建议的那样,解决了我的问题。

gem install net-ssh -v 2.9.3.beta1

Before that, I tried gem install net-ssh, but it didn't help.

在此之前,我尝试过gem install net-ssh,但没有帮助。

回答by Peter L

I ran into this problem when I used the latest version of Ruby (currently 2.2.1) as stated on the OpenShift setup instructions. I fixed it by:

当我使用 OpenShift 安装说明中所述的最新版本的 Ruby(当前为 2.2.1)时,我遇到了这个问题。我通过以下方式修复它:

  1. Installing Ruby 1.9.3
  2. Re-running "gem install rhc"
  1. 安装 Ruby 1.9.3
  2. 重新运行“gem install rhc”

After that, I was able to run "rhc setup" without any issue.

之后,我可以毫无问题地运行“rhc setup”。

回答by rbashish

If you are running Windows 10Pro x64, try installing Ruby2.1.8 (x64)with Git Version 2.7.0. This will surely allow you to run rhc setupas it did happened with me. Earlier I had a problem running & installing latest version of Ruby 2.2.4 (x64)but when I downgraded to ruby version 2.1.8 (x64)I was able to run rhc setupand configure OpenShift client toolson Windows. See the image for Ruby version I'm using - ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]

如果您运行的是Windows 10Pro x64,请尝试使用Git 版本 2.7.0安装Ruby2.1.8 (x64)。这肯定会让你像我一样奔跑。早些时候我在运行和安装最新版本时遇到了问题,但是当我降级到 ruby​​ 版本时,我能够在 Windows 上运行和配置。查看我正在使用的 Ruby 版本的图像 -rhc setupRuby 2.2.4 (x64)2.1.8 (x64)rhc setupOpenShift client toolsruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]

enter image description here

在此处输入图片说明

Read herefor getting started to OpenShift client toolson windows.

阅读此处以开始OpenShift client tools使用 Windows。

回答by Gayan Weerakutti

Use the RHC testedRuby version instead of the latest. As of today it is 1.9.3-p194

使用RHC 测试过的Ruby 版本而不是最新的。截至今天,它是1.9.3-p194

回答by user1419261

Try using/installing a lower version of ruby after uninstalling the 2,2,0 because some windows version conflict with ruby version you are using. I tried 2.2.3 and then lowered to 2.2.0 and it worked for me.

卸载 2,2,0 后尝试使用/安装较低版本的 ruby​​,因为某些 Windows 版本与您使用的 ruby​​ 版本冲突。我尝试了 2.2.3,然后降低到 2.2.0,它对我有用。

回答by Divya Mary

I ran into this same error, and none of the solutions worked for me. In a last attempt, I installed the Ruby 1.9.3-p551 version and the rhc setup went smoothly. I use a Windows 10 machine.

我遇到了同样的错误,没有一个解决方案对我有用。在最后一次尝试中,我安装了 Ruby 1.9.3-p551 版本,并且 rhc 设置进行得很顺利。我使用 Windows 10 机器。

回答by hosais

I am running Windows 10 Pro x64. I installed Ruby 2.1.8 (x64) with Git Version 2.7.2. Rhc was installed successfully. However, "rhc snapshot save ..." command had problem with net-ssh. However, after restarting windows 10 the errors was gone.

我正在运行 Windows 10 专业版 x64。我安装了 Ruby 2.1.8 (x64) 和 Git 版本 2.7.2。rhc 安装成功。但是,“rhc 快照保存...”命令在 net-ssh 中存在问题。但是,在重新启动 Windows 10 后,错误消失了。

Remember to try reboot your windows.

请记住尝试重新启动 Windows。