I was trying to install Mongrel in my Ubuntu system, but unsuccessfully. After typing sudo gem install mongrel, the following error popped up:
lucas@lucas-laptop:~$ 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: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/fastthread-1.0.1 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out </macro:code>
After searching a little for the answer, it seems like I had a broken ruby installation. I needed the ruby-dev package installed, because mongrel uses C/C++ in somes places for better performance.
This site explains everything in details and how you can solve it:
And now the quick solution for the problem:
sudo apt-get install build-essential sudo apt-get install ruby1.8-dev sudo gem install mongrel
Thank you all at soakedandsoaped.com for this tip!
