rhc setup给出错误`没有这样的文件dl/import`

Vla*_*din 158 ruby openshift

我正在安装openhift客户端工具,如下所述: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:在`require':无法加载这样的文件--dl/import(LoadError)

完整堆栈跟踪:

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>'
Run Code Online (Sandbox Code Playgroud)

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

我怎么能得到工作rhc?

Vla*_*din 208

将net-ssh更新为2.9.3.beta1,正如cremno本评论中所建议的,解决了我的问题.

gem install net-ssh -v 2.9.3.beta1
Run Code Online (Sandbox Code Playgroud)

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

  • 问题在于Ruby 2.2.2.降级到Ruby到2.1.6和net-ssh到2.9.2 [在Github中发布详细信息](https://github.com/openshift/rhc/issues/682).即使rhc安装了2.9.3.beta1,在ssh连接到应用程序时,它也无法正常工作.它会抱怨:无法解析PKey:没有起始行 (9认同)
  • 我遇到过同样的问题.但是,你需要GEM安装2.9.3beta1而不是2.5.3,所以命令应该是gem install net-ssh -v 2.9.3.beta1 (3认同)
  • 这不适合我.我安装了Ruby 1.9.3并重新安装了rhc,这很有用. (3认同)
  • 它对我不起作用:( C:\> rhc setup C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in,require':无法加载file - dl/import(LoadError)来自C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_req uire.rb:54:在`require'........来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.38.4/bin/rhc:20:在C:/ Ruby22-x64的`<t op(required)>'中/ bin/rhc:23:来自C:/ Ruby22-x64/bin/rhc:23的`load'在`<main>'中 (2认同)

小智 49

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

  1. 安装Ruby 1.9.3
  2. 重新运行"gem install rhc"

之后,我能够毫无问题地运行"rhc setup".

  • 我确认使用ruby 1.9.3的解决方案.我尝试使用最新的2.2.x,但它失败了.我卸载它,安装程序1.9.3,再次运行`gem install rhc`然后再次运行`rhc setup`,现在工作正常. (5认同)
  • gem install net-ssh -v 2.9.3.beta1有效,无需重新安装ruby到旧版本 (4认同)

rba*_*ish 17

如果您运行的是Windows 10 Pro x64,请尝试使用Git版本2.7.0安装Ruby 2.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]

在此输入图像描述

阅读这里开始OpenShift client tools使用Windows.

  • 这也发生在我身上.谢谢. (2认同)

Gay*_*tti 11

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