Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing newgem on linux

Tags:

linux

ruby

I am trying to install newgem on my linux box (sudo gem install newgem) and i am getting 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 could the problem be?

like image 692
Jason Miesionczek Avatar asked Oct 08 '08 16:10

Jason Miesionczek


2 Answers

mkmf is a Ruby module which generates Makefiles. It is supposed to be part of the standard Ruby install, but Debian (and derivatives) split it out into the ruby1.8-dev package.

If you can't find mkmf.rb in any of the directories outputted by ruby -e'print $:.join("\n")', then you should figure out what you need to install.

like image 60
ephemient Avatar answered Nov 09 '22 21:11

ephemient


Its probably caused by one of its dependencies. I don't think it needs all those dependencies anymore. If its still an issue, raise a bug at http://drnic.lighthouseapp.com/projects/18881-newgem/ and we'll see what dependencies can be ripped out.

like image 21
Dr Nic Avatar answered Nov 09 '22 23:11

Dr Nic