no such file to load — mkmf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  
Building native extensions. This could take a while...
  
ERROR: Error installing rails:
      
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
  
extconf.rb:1:in \`require': no such file to load - mkmf (LoadError)
      
from extconf.rb:1
  

For some reason, mkmf.rb is part of the ruby1.8-dev package, and initially I hadn’t installed that.

#install ruby1.8-dev

1
2
3
  
sudo apt-get install ruby1.8-dev
  

and everything trotted along happily after that.