I’ve started learning Ruby on Rails, and I needed the mysql driver. Should be simple,
right? Just gem install mysql or something?
root@asuka:~# gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
Once tangled mess of Google, Debian, and Ruby later, I found a bug report and a solution (for me at least).
Debian Bug 373843 – Long story short, you need ruby1.8-dev or, it appears, libmysql-ruby.