0

我有 Ruby 2.2,每次遇到相同错误时,我都无法从命令提示符运行任何文件 .rb:

C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
        from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic/win32.rb:1:in `<top (required)>'
        from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic.rb:32:in `<top (required)>'
        from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:41:in `load_driver'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:33:in `load_driver_for'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:14:in `start'
        from test.rb:2:in `<main>'

我该怎么办?

4

1 回答 1

0

尝试这个:

gem install net-ssh -v 2.9.3.beta1
于 2015-10-14T20:20:13.560 回答