# Builder.rb:48 - Cannot allocate memory

**URL:** <https://www.ruby-forum.com/t/builder-rb-48-cannot-allocate-memory/133527>\
**Category:** Rails\
**Created:** [April 1, 2008, 10:54am UTC](https://www.ruby-forum.com/t/builder-rb-48-cannot-allocate-memory/133527 "2008-04-01T10:54:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@johnny](https://www.ruby-forum.com/u/johnny)\
**Post date:** [April 1, 2008, 10:54am UTC](https://www.ruby-forum.com/t/builder-rb-48-cannot-allocate-memory/133527/1 "2008-04-01T10:54:37Z")

</div>

Hi,

I’m having a very strange error I’ve never seen before when I try: gem  
install mongrel

Here is the output with --debug turned on:

root@hebrardmedia:~/software/ruby.1.8.6/ruby-1.8.6# gem install  
mongrel --debug  
Exception `NameError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ command_manager.rb:133 - uninitialized constant Gem::Commands::InstallCommand Exception`Gem::LoadError’ at /usr/local/lib/ruby/site\_ruby/1.8/  
rubygems.rb:499 - Could not find RubyGem sources (\> 0.0.1)

Exception `IOError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ format.rb:50 - closed stream Exception`Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243

- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
test  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
test  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
test  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
test  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/  
fastthread  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/  
fastthread  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1  
Exception `Errno::EEXIST’ at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1  
Building native extensions. This could take a while…  
Exception `Errno::ENOMEM' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/ext/builder.rb:48 - Cannot allocate memory - /usr/local/bin/ ruby extconf.rb install mongrel --debug 2>&1 Exception`Gem::Installer::ExtensionBuildError’ at /usr/local/lib/ruby/  
site\_ruby/1.8/rubygems/installer.rb:410 - ERROR: Failed to build gem  
native extension.

/usr/local/bin/ruby extconf.rb install mongrel --debug

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/  
fastthread-1.0.1 for inspection.  
Results logged to /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
ext/fastthread/gem\_make.out

ERROR: Error installing mongrel:  
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install mongrel --debug

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/  
fastthread-1.0.1 for inspection.  
Results logged to /usr/local/lib/ruby/gems/1.8/gems/fastthread-1.0.1/  
ext/fastthread/gem\_make.out  
root@hebrardmedia:~/software/ruby.1.8.6/ruby-1.8.6#

I’m running Ubunutu 7.04 with ruby 1.8.6 and gems 1.1.0.

I hope there is any easy fix for this 😕 Debian/Ubuntu and ruby just  
never play nice!

Thanks in advance,  
Johnny.
