Wednesday, September 16, 2009

Gem install errors

When installing gems, sometimes you get the following message:

dean@Dean-Ubuntu:~$ sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

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

The quick answer is:

sudo apt-get install ruby-dev

I guess ruby-dev contains the native headers that the finished product "just Ruby..." doesn't have.

No comments:

Post a Comment