Ubuntu install Nokogiri
First check if you have Ruby installed in your Ubuntu. Type the following command to check.
If it is showing you your Ruby version then Ruby is already installed in your environment. Next to install Nokogiri, type the command below.
gem install nokogiri
Clean Ubuntu 18.04 quick install Nokogiri
Assuming you are installing Nokogiri using a brand new clean Ubuntu 18.04. To quickly install Nokogiri. Use these following commands.
sudo apt update sudo apt upgrade -y sudo apt install ruby ruby-dev libz-dev build-essential -y sudo gem install nokogiri