Can't install gem: Failed to build gem native extension while trying to install Watir
6,245
I had to run a few commands to get it to work.
sudo apt-get install ruby-dev
Then, while looking back at the documentation, I realized I also had to install selenium-webdriver
sudo gem install selenium-webdriver
You might also have to run the following command before installing selenium-webdriver
sudo gem update --system
Related videos on Youtube
Author by
Jordan Baron
Updated on September 18, 2022Comments
-
Jordan Baron over 1 year
I am trying to install Watir, but when I try to run
sudo gem install watir
I get this errorBuilding native extensions. This could take a while... ERROR: Error installing watir: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c /usr/bin/ruby2.3 -r ./siteconf20170429-29912-10tswho.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
How can I install Watir?