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

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

我正在安装 openshift 客户端工具,如下所述:https://developers.openshift.com/en/getting-started-windows.html#client-tools。 在第 'Setting up Your Machine' 步出现错误:

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)

完整堆栈跟踪:

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>'

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

我怎样才能开始工作 rhc?

将 net-ssh 更新为 2.9.3.beta1,作为 cremno suggested in ,解决了我的问题。

gem install net-ssh -v 2.9.3.beta1

在那之前,我试过gem install net-ssh,但没有用。

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

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

在那之后,我能够 运行 "rhc setup" 没有任何问题。

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

卸载 2,2,0 后尝试 using/installing 较低版本的 ruby,因为某些 windows 版本与您正在使用的 ruby 版本冲突。我试过 2.2.3,然后降低到 2.2.0,它对我有用。

如果您是 运行ning Windows 10 Pro x64,请尝试安装 Ruby 2.1.8 (x64) with Git Version 2.7.0。这肯定会让你 运行 rhc setup 就像我身上发生的那样。早些时候我遇到了 运行 安装最新版本 Ruby 2.2.4 (x64) 的问题,但是当我降级到 ruby 版本 2.1.8 (x64) 时,我能够 运行 rhc setup 并在 Windows 上配置 OpenShift client tools。查看我正在使用的 Ruby 版本的图像 - ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]

Read here 在 windows 开始 OpenShift client tools

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

我是 运行 Windows 10 Pro x64。我安装了 Ruby 2.1.8 (x64) 和 Git 版本 2.7.2。 rhc 安装成功。但是,"rhc snapshot save ..." 命令与 net-ssh 有问题。然而,在重新启动 windows 10 之后错误消失了。

记得尝试重新启动您的 windows。