no such file to load — ffi_c (LoadError)

后端 未结 2 1648
南旧
南旧 2021-02-19 14:32

This problem is bugging me for a couple of days now... Whenever I\'m using the .bring_to_front method

require \"rubygems\"
require \"watir\"

browser = Watir::Br         


        
相关标签:
2条回答
  • 2021-02-19 14:40

    I think the missing file relates to the FFI gem. I had issues trying to use FFI v1.0.10 myself (when it went to install, and due to something pertaining to webdriver code) so on my box I have v1.0.9 of that gem installed.

    I'd say there's not much to lose by trying to roll that gem back a version. From the command line type

    gem uninstall ffi
    

    once it's done then

    gem install ffi -v 1.0.9
    

    See if that fixes things for you.

    Update the FFI gem has since updated past 1.1.0 and these versions seem to work fine with watir and watir-webdriver, however the gem is not pre-compiled, and has to compile code when it installs. This means if you are running on a PC you will need to install the Ruby development kit for windows, aka 'devkit', you can get it from the downloads page on the rubyinstaller site

    download and install devkit first, then open a new command line window and use

    gem install ffi
    

    to get the latest version of the FFI gem

    if for some reason that does not work for you, you can always use the original instructions above to install the slightly older version of the FFI gem

    0 讨论(0)
  • 2021-02-19 14:57

    gem install ffi --pre

    The above command worked for me under windows

    0 讨论(0)
提交回复
热议问题