Monday, June 4, 2007

Where is mkmf?

I was recently trying to install Ruby's SQLite adapter to make my development easier (e.g. no fussing with SQL servers). I did a quick Google search with no obvious results so I figured it couldn't be that hard and hopped over to rubyforge.org to get the gem. I found sqlite3-ruby, which fit the bill, and started installing it.
sudo gem install sqlite3-ruby
Select which gem to install for your platform (i486-linux)
1. sqlite3-ruby 1.2.1 (mswin32)
2. sqlite3-ruby 1.2.1 (ruby)
3. sqlite3-ruby 1.2.0 (mswin32)
4. sqlite3-ruby 1.2.0 (ruby)
5. Skip this gem
6. Cancel installation
> 2
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install sqlite3-ruby
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

What the frack? A little experimenting and searching lead me to this post which explained that mkmf is part of the ruby1.8-dev package. A quick apt-get install and I was good to go.

No comments: