error installing rcov gem on ubuntu 7.1

I am running Ubuntu 7.1 and getting the following error when trying to install rcov. What do i do?

dev@localhost:~$ sudo gem install rcov

Select which gem to install for your platform (i486-linux)

  1. rcov (mswin32)

  2. rcov (ruby)

  3. rcov (ruby)

  4. rcov (mswin32)

  5. Skip this gem

  6. Cancel installation


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 rcov

extconf.rb:1:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:1

Gem files will remain installed in /var/lib/gems/1.8/gems/rcov- for inspection.

Results logged to /var/lib/gems/1.8/gems/rcov-


No worries. Was able to get it to work with
sudo apt-get install rcov


I think the recommended way is to do the following

sudo apt-get install build-essential

Then install gems the normal way. Otherwise you will be dependent on
ubuntu repositories for all your gems with native extensions, and you
may be stuck a few versions behind (or completely without -- is
Nokogiri, for example, available at all yet?)

-- Mark.