简体   繁体   中英

Can't run file.rb from command prompt

i have Ruby 2.2 and i can't run any file .rb from command prompt each time i have same error:

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

what shall i do?

尝试这个:

gem install net-ssh -v 2.9.3.beta1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM