3

I am running ubuntu 14.04.3 LTS on an Amazon EC2 instance. Any help resolving this error would be much appreciated.

Typing sudo gem install mongo yields the following:

Fetching: bson-3.2.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mongo:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/bson-3.2.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/bson-3.2.1/ext/bson/gem_make.out
Dsel
  • 1,027
  • 3
  • 13
  • 22
  • 1
    Have a look at this other question; http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror – Christian Aug 18 '15 at 00:39
  • 1
    As indicated in the answer to the link you posted, running sudo apt-get install ruby-dev fixed the error. Thanks very much. If you post an answer I will accept it – Dsel Aug 18 '15 at 00:51

1 Answers1

3

Another question - `require': no such file to load -- mkmf (LoadError) - has an answer which should fix the problem for you;

sudo apt-get install ruby1.9.1-dev

sudo apt-get install ruby-dev
Community
  • 1
  • 1
Christian
  • 3,917
  • 2
  • 23
  • 40