# ERROR: While executing gem ... (Gem::Installer::ExtensionBu

**URL:** <https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160>\
**Category:** Ferret\
**Created:** [August 28, 2007, 8:52am UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160 "2007-08-28T08:52:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![geth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@geth](https://www.ruby-forum.com/u/geth)\
**Post date:** [August 28, 2007, 8:52am UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160/1 "2007-08-28T08:52:41Z")

</div>

Hi all,

Sorry if this is answered somewhere – I am new to ruby and to linux,  
and can’t figure it out:

When I try to install ferret (see below), I get ERROR: While executing  
gem … (Gem::Installer::ExtensionBuildError). Same thing happens for  
any version I pick from th list.

I am using:  
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)  
ruby 1.8.5 (2006-08-25) [i486-linux]  
gem 0.9.4

No idea how to fix this – please help!

Thanks,

Geth

========================================================

gethryn@gethryn-desktop:~/rails\_space$ sudo gem install ferret  
Password:  
Select which gem to install for your platform (i486-linux)

1. ferret 0.11.4 (ruby)
2. ferret 0.11.4 (mswin32)
3. ferret 0.11.3 (ruby)
4. ferret 0.11.2 (ruby)
5. Skip this gem
6. Cancel installation

> 1  
> 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 ferret  
extconf.rb:11:in `require’: no such file to load – mkmf (LoadError)  
from extconf.rb:11

Gem files will remain installed in  
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.4 for inspection.  
Results logged to  
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.4/ext/gem\_make.out  
gethryn@gethryn-desktop:~/rails\_space$

---

<div class="post-metadata">

**Author:** ![geth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@geth](https://www.ruby-forum.com/u/geth)\
**Post date:** [August 28, 2007, 9:46am UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160/2 "2007-08-28T09:46:24Z")

</div>

> ruby extconf.rb install ferret  
> extconf.rb:11:in `require’: no such file to load – mkmf (LoadError)  
> from extconf.rb:11

Geth,

i would assume, your ruby setup is broken. at least for root.  
are you able to compile other extension or install other  
gems? mkmf is a basic library of ruby, i’ve got it automatically  
installed by ruby at

/usr/lib/ruby/1.8/mkmf.rb

are you able to open a irb session and require mkmf  
manually? did you check, if that file exists in your ruby  
1.8 folder? maybe you should reinstall ruby.

and did you check the log file?

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.4/ext/gem\_make.out

Ben

---

<div class="post-metadata">

**Author:** ![geth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@geth](https://www.ruby-forum.com/u/geth)\
**Post date:** [August 28, 2007, 9:56am UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160/3 "2007-08-28T09:56:27Z")

</div>

On Tue, Aug 28, 2007 at 09:45:28AM +0200, Benjamin K. wrote:

> /usr/lib/ruby/1.8/mkmf.rb

he’s on Ubuntu, which inherited the nice feature of having Ruby split up  
in several packages from Debian ☹

mkmf is part of ruby1.8-dev.

Jens

–  
Jens Krämer  
webit! Gesellschaft für neue Medien mbH  
Schnorrstraße 76 | 01069 Dresden  
Telefon +49 351 46766-0 | Telefax +49 351 46766-66  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold, Hagen Malessa

---

<div class="post-metadata">

**Author:** ![geth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@geth](https://www.ruby-forum.com/u/geth)\
**Post date:** [August 28, 2007, 10:47am UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160/4 "2007-08-28T10:47:27Z")

</div>

Jens K. wrote:

> he’s on Ubuntu, which inherited the nice feature of having Ruby split up  
> in several packages from Debian ☹
> 
> mkmf is part of ruby1.8-dev.

A THOUSAND THANK YOUS! I can finish the book I am learning from now!

“Successfully installed ferret-0.11.4”

worked perfectly after I ran:

$ sudo apt-get install ruby1.8-dev

Thanks again,

Geth

---

<div class="post-metadata">

**Author:** ![geth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@geth](https://www.ruby-forum.com/u/geth)\
**Post date:** [December 22, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/error-while-executing-gem-gem-extensionbu/113160/5 "2007-12-22T16:43:04Z")

</div>

Thanks a lot.

You saved my time

Benjamin K. wrote:

> > ruby extconf.rb install ferret  
> > extconf.rb:11:in `require’: no such file to load – mkmf (LoadError)  
> > from extconf.rb:11
> 
> Geth,
> 
> i would assume, your ruby setup is broken. at least for root.  
> are you able to compile other extension or install other  
> gems? mkmf is a basic library of ruby, i’ve got it automatically  
> installed by ruby at
> 
> /usr/lib/ruby/1.8/mkmf.rb
> 
> are you able to open a irb session and require mkmf  
> manually? did you check, if that file exists in your ruby  
> 1.8 folder? maybe you should reinstall ruby.
> 
> and did you check the log file?
> 
> /usr/lib/ruby/gems/1.8/gems/ferret-0.11.4/ext/gem\_make.out
> 
> Ben
