Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)

There are similar questions:

Usually, the solution is:

sudo apt-get install ruby-dev

Or, if that doesn’t work, depending on your ruby version, run something like:

sudo apt-get install ruby1.9.1-dev

Should fix your problem.


Still not working? Try the following after installing ruby-dev:

sudo apt-get install make

Leave a Comment