I tried to install Ruby selenium-webdriver but I got this error:
sudo gem install selenium-webdriver
[sudo] password for sam:
Building native extensions. This could take a while...
ERROR: Error installing selenium-webdriver:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.4.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby2.4 -r ./siteconf20170509-10458-cbn64m.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.4.0/gems/ffi-1.9.18 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.18/gem_make.out
I've tried different methods that I found from different forums but they didn't work for me.Ruby version is 2.4 and Ubuntu version is 16.04
apt-get install ruby-dev,sudo gem update --system,sudo apt-get install make/var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.18/gem_make.out, should be edited into the questionsudo apt-get install ruby2.4-dev-devpackage didn't. Don't forget to post that as an answer!