Gem::Ext::BuildError while trying to install gem bootstrap-sass in rails app

Okay so I'm trying to install the gem bootstrap-sass in my ruby on rails app but getting this error.

I followed the basic steps by pasting $ gem 'bootstrap-sass' and $ gem 'autoprefixer-rails' into the gemfile and runnig bndle install in the terminal. My laptop is running on ubuntu 18.04 if that might be causing issue.

Installing autoprefixer-rails 9.6.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Fetching ffi 1.11.1
Installing ffi 1.11.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/bin/ruby2.5 -r ./siteconf20190706-4690-tr7q8y.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
/tmp/bundler20190706-4690-hktydzffi-1.11.1/gems/ffi-1.11.1 for inspection.
Results logged to

An error occurred while installing ffi (1.11.1), and Bundler cannot
Make sure that `gem install ffi -v '1.11.1'` succeeds before bundling.

In Gemfile:
  bootstrap-sass was resolved to 3.4.1, which depends on
    sassc was resolved to 2.0.1, which depends on