Unable to install Jekyll in Fish shell ubuntu 16.04

Installing Jekyll Gem in Ubuntu 16.04 throws the following error:-

Ruby Version - 2.7.1
Ubuntu - 16.04
Shell - Fish

no idea about linux, but when you see ruby saying it cannot build native extensions I think that means you are missing the ruby dev tools. On Windows there is a particular installer that includes the dev tools - if you don’t use that you get the same message. Some gems need to be built locally from the source and plain ruby can’t do that?

I installed the ruby devtool using sudo apt, but it installed the dev tools for Ruby 2.3 and Jekyll needs Ruby 2.4 or greater to be installed. So I uninstalled them back but facing the same problem.