no such file to load -- mkmf
While checking out Scott Baron’s coverage-tool for Ruby, insurance, I ran into a minor issue on my - by now - fairly beat up Debian installation.
jcop@mental:~$ sudo gem install insurance
Attempting local installation of 'insurance'
Local gem file not found: insurance*.gem
Attempting remote installation of 'insurance'
Updating Gem source index for: http://gems.rubyforge.org
Building native extensions. This could take a while...
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Thankfully, Google led me to the answer on RubyForge. For some reason, mkmf.rb is part of the ruby1.8-dev package, and initially I hadn’t installed that since it is described as
Header files for compiling extension modules for the Ruby 1.8
Ah well. A quick
sudo apt-get install ruby1.8-dev
and everything trotted along happily after that.