Strange error when installing mysql

Hello everyone,

I am getting this error when i am trying to install the mysql driver.

I do the following: sudo gem install mysql, i chose number 3 and then i
get this error:

Building native extensions. This could take a while…
extconf.rb:1:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:1

ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
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

Any ideas how to fix this?

Thanks in advance.


You’re missing the ruby development headers. If this is a Debian based
system, or Ubuntu, you need to install the ruby1.8-dev package (and
libmysqlclient15-dev for mysql itself).


Jochem Kossen