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

时间:2015-03-06 10:20:56

标签: ruby openshift

我按照说明安装了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_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>'

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

如何让rhc工作?

6 个答案:

答案 0 :(得分:207)

将net-ssh更新为2.9.3.beta1,cremno中建议的this comment解决了我的问题。

gem install net-ssh -v 2.9.3.beta1

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

答案 1 :(得分:49)

当我使用OpenShift设置说明中所述的最新版本的Ruby(当前为2.2.1)时遇到了这个问题。我修理了它:

  1. 安装Ruby 1.9.3
  2. 重新运行“gem install rhc”
  3. 之后,我能够毫无问题地运行“rhc setup”。

答案 2 :(得分:17)

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

enter image description here

Read here在Windows上开始使用OpenShift client tools

答案 3 :(得分:11)

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

答案 4 :(得分:1)

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

答案 5 :(得分:0)

我正在运行Windows 10 Pro x64。我用Git Version 2.7.2安装了Ruby 2.1.8(x64)。 Rhc安装成功。但是,“rhc snapshot save ...”命令有net-ssh的问题。但是,重新启动Windows 10后,错误消失了。

请记住尝试重新启动Windows。