Error installing newgem on linux

I try to install newgem in my linux box (sudo gem install newgem) and I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing newgem:
ERROR: Failed to build gem native extension.

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


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.4 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.4/ext/redcloth_scan/gem_make.out

What is the problem?

+5
source share
2 answers

mkmfis the Ruby module that generates the Makefile. It is supposed to be part of the standard Ruby installation, but Debian (and its derivatives) break it down into a package ruby1.8-dev.

If you cannot find mkmf.rbin any of the directories displayed ruby -e'print $:.join("\n")', then you should find out what you need to install.

+6
source

All Articles