When a gem fails, where do I find the mkmf.log file?

givanse picture givanse · Dec 4, 2013 · Viewed 30.4k times · Source

Can't find the 'libpq-fe.h header

** extconf.rb failed **

Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details.

Where do I find the mkmf.log file?

Answer

givanse picture givanse · Dec 4, 2013

The mkmf.log file can be found under the gem's installation directory.

rvm

If you are using RVM, then look for a directory similar to

~/.rvm/gems/ruby-1.9.3-p194/gems/some-cool-gem-name/ext/mkmf.log

You can list all the mkmf.log files available with this command:

find ~/.rvm -name mkmf.log

rbenv

find ~/.rbenv -name mkmf.log