I am trying to install the github-pages ruby gem on Linux Mint for use with jekyll.
sudo gem install github-pages
WARNING: You don't have /home/max/.gem/ruby/2.3.0/bin in your PATH,
gem executables will not run. Building native extensions. This could
take a while...
ERROR: Error installing github-pages: ERROR: Failed
to build gem native extension.
sudo echo $PATH
sudo PATH=$PATH command
It is possible that sudo is scrubbing your path environment variable.
Also if you want to check the path that command with sudo sees run this instead, otherwise $PATH gets extrapolated by current shell.
sudo bash -c 'echo $PATH'