Rhc 设置出错‘ no such file dl/import’

我正在安装 openshift 客户端工具,如下所述: https://developers.openshift.com/en/getting-started-windows.html#client-tools。 在“设置你的机器”这一步,我犯了一个错误:

Rhc 设置 C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core _ ext/kernel _ demand. rb: 54: in‘ need’ : 无法加载这样的文件—— 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。

我怎样才能得到工作 rhc?

43645 次浏览

按照 此评论中的 奶油蛋糕建议,将 net-ssh 更新为2.9.3. beta1,解决了我的问题。

gem install net-ssh -v 2.9.3.beta1

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

当我使用最新版本的 Ruby (目前是2.2.1)时,我遇到了这个问题,正如 OpenShift 设置说明中所说明的那样。我通过以下方式修好了它:

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

在那之后,我能够运行“ rhc 设置”没有任何问题。

使用 RHC 测试 Ruby 版本而不是最新版本

卸载2,2,0之后,尝试使用/安装一个较低版本的 Ruby,因为有些 Windows 版本与您正在使用的 Ruby 版本冲突。我尝试了2.2.3,然后降低到2.2.0,它对我很有效。

如果您运行的是 视窗10Pro x64,请尝试使用 Git Version 2.7.0安装 Ruby2.1.8(x64)。这肯定会让你运行 rhc setup,因为它发生在我身上。早些时候,我有一个问题运行和安装最新版本的 Ruby 2.2.4 (x64),但当我降级到红宝石版本 2.1.8 (x64)我能够运行 rhc setup和配置 OpenShift client tools在 Windows 上。请参见我正在使用的 Ruby 版本的图像 -ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]

enter image description here

阅读此处 了解如何在 windows 上开始使用 OpenShift client tools

我遇到了同样的错误,没有一个解决方案对我有效。在最后一次尝试中,我安装了 Ruby1.9.3-p551版本,rhc 的安装进行得很顺利。我用的是 Windows10系统的机器。

我正在运行 Windows 10 Pro x64。我用 Git Version 2.7.2安装了 Ruby 2.1.8(x64)。Rhc 安装成功。然而,“ rhc 快照保存...”命令对 net-ssh 有问题。但是,在重新启动 Windows10之后,错误就消失了。

记得重新启动你的窗口。