Installation error gem failed to create custom gem extensions - unable to load such file - mkmf

RoR is good, but sometimes it makes me want to bang my head against the wall (and this is probably my fault). I'm just trying to install the Thingem web client, and when I start sudo gem install thin, I get the following error (first, the eventmachine gem must be installed):

    sudo gem install thin
    Fetching: eventmachine-1.0.1.gem (100%)
    Building native extensions.  This could take a while...
    ERROR:  Error installing thin:
            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:2:in `<main>'

I was looking for the error “cannot load such a file - mkmf”, but most of the problems seem to be related to the fact that it was available in version 1.8-dev, but not in 1.8, but since I am running 1.9.3 I decided that I have mkmf - which I checked with locate mkmf:

    /home/ubuntu/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/mkmf.rb

, mkmf, /usr/lib/ruby ​​/... - , , , , , , .

, RVM ruby ​​1.9.3, gem install...

!

+5
5

RVM, 'sudo'. sudo libs rvm.

gem install thin

, .

~

+5

rvm, , ruby-devel

+5

Ubuntu 12.04. :

sudo apt-get install build-essential
sudo apt-get install curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
+3

Try a command to help solve the problem.

sudo gem install thin -- --with-cflags=\"-O2 -pipe -march=native -w\"
+1
source

This did it for me:

sudo apt-get install ruby-dev

Greetings

+1
source

All Articles