Metz
Metz

Reputation: 675

custom_require.rb load error in eventmachine installation

I'm having a problem with my gems dependencies: the content of the Gemfile is

source :gemcutter
gem "sinatra"
gem "koala"
gem "json", "1.5.5"
gem "httparty"
gem "thin"
gem "rack", "1.3.10"

And a bundle install hit me with this error

$ sudo bundle install
The source :gemcutter is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using addressable (2.2.7) 
Using crack (0.1.8) 
Using daemons (1.1.3) 
Installing eventmachine (0.12.10) 
Gem::Installer::ExtensionBuildError: 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/eventmachine-0.12.10 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out

An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.

However, I do have eventmachine installed!:

$ gem list

*** LOCAL GEMS ***

eventmachine (1.0.3, 1.0.0.rc.4, 0.12.10)

Help me, you're my only hope! Thank you.

Upvotes: 0

Views: 2259

Answers (1)

Ch4rAss
Ch4rAss

Reputation: 754

ruby 1.9.1 had some issues with C extensions. Try to check if you have mkmf:

locate mkmf

or install dev version of ruby 1.9.1:

sudo apt-get install ruby1.9.1-dev

I recommend to use RVM for installing rubies: https://rvm.io/

You can also try to change source in your Gemfile

source 'https://rubygems.org'

instead of :gemcutter

Upvotes: 3

Related Questions