Ruby FFI是ChildProcess gem中Windows或posix_生成支持所必需的先决条件

Ruby FFI是ChildProcess gem中Windows或posix_生成支持所必需的先决条件,ruby,cucumber,watir,ffi,rubymine,Ruby,Cucumber,Watir,Ffi,Rubymine,我正在执行使用Ruby编程语言创建的Cucumber脚本,但它抛出了一个与子进程相关的错误,该子进程有一个先决条件odFFI gem,下面是错误跟踪 FFI is a required pre-requisite for Windows or posix_spawn support in the ChildProcess gem. Ensure the `ffi` gem is installed. If you believe this is an error, please file

我正在执行使用Ruby编程语言创建的Cucumber脚本,但它抛出了一个与子进程相关的错误,该子进程有一个先决条件od
FFI gem
,下面是错误跟踪

    FFI is a required pre-requisite for Windows or posix_spawn support in the ChildProcess gem. Ensure the `ffi` gem is installed. If you believe this is an error, please file a bug at http://github.com/enkessler/childprocess/issues (ChildProcess::MissingFFIError)
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/childprocess-3.0.0/lib/childprocess/windows.rb:6:in `rescue in <top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/childprocess-3.0.0/lib/childprocess/windows.rb:3:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/childprocess-3.0.0/lib/childprocess.rb:209:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/childprocess-3.0.0/lib/childprocess.rb:209:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver.rb:20:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver.rb:20:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.142.6/lib/selenium-webdriver.rb:20:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.142.6/lib/selenium-webdriver.rb:20:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/watir-6.11.0/lib/watir.rb:1:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/watir-6.11.0/lib/watir.rb:1:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/page-object-2.2.4/lib/page-object.rb:1:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/page-object-2.2.4/lib/page-object.rb:1:in `<top (required)>'
E:/e2NxtAutomation/DEVOPS/Spec/Func/features/support/env.rb:4:in `require'
E:/e2NxtAutomation/DEVOPS/Spec/Func/features/support/env.rb:4:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/glue/registry_and_more.rb:107:in `load'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/glue/registry_and_more.rb:107:in `load_code_file'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime/support_code.rb:144:in `load_file'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime/support_code.rb:85:in `block in load_files!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime/support_code.rb:84:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime/support_code.rb:84:in `load_files!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime.rb:272:in `load_step_definitions'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/runtime.rb:68:in `run!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/lib/cucumber/cli/main.rb:34:in `execute!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.1/bin/cucumber:9:in `<top (required)>'
C:/Ruby24-x64/bin/cucumber:23:in `load'
C:/Ruby24-x64/bin/cucumber:23:in `<main>'

Process finished with exit code 2
但同样的错误还是发生了。我的机器详细信息 操作系统:Windows7 Ruby版本:2.4.0


建议我一些解决方法。

我建议检查ruby的版本。 外国金融机构创业板有不同的版本。 有些在ruby上工作到2.2版。 有时,您正在旧的ruby版本上安装最新版本的FFI gem
我建议卸载当前的ruby并将ruby升级到2.5.7版。完成后,重新安装gems并查看您的自动化是否正常使用此命令安装FFI-gem install FFI-v 1.13.1

我也有同样的问题,但我有ruby 2.6.5p114(2019-10-01修订版67812),我认为这是最新版本。为什么ruby这么难相处?
gem install ffi
Fetching: ffi-1.11.3-x64-mingw32.gem (100%)
Successfully installed ffi-1.11.3-x64-mingw32
Parsing documentation for ffi-1.11.3-x64-mingw32
Installing ri documentation for ffi-1.11.3-x64-mingw32
Done installing documentation for ffi after 2 seconds
1 gem installed