Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot load such file -- ffi_c error in RubyMine

I tried to run a simple script as follows to learn automation using watir-webdriver and Ruby. But I am getting no such class error -ffi_c.

class TestWatir
  require 'watir-webdriver'
  require 'cucumber'
  browser = Watir :: Browser.new :firefox
  browser.goto 'http://www.google.com'
end

I've added Cucumber and Watir-webdriver gems and also checked there is ffi dependency in the external library.

like image 881
Rohin Avatar asked Feb 09 '26 21:02

Rohin


1 Answers

I had this problem and resolved it by:

del Gemfile.lock
bundle clean --force
gem install bundler -v 1.12.1
gem install ffi -v 1.9.10 --platform=ruby
bundle install

It seams that some versions of ffi era labeled with the incorrect platform or something like that, that's bringing some problems on windows.

Hope it helps!

like image 198
AxelWass Avatar answered Feb 12 '26 15:02

AxelWass