Zack
Zack

Reputation: 2497

Failed to build native Gem extension

I am attempting to run "bundle install" but keep getting the following error messages...

~/src/*******/******_bundle/trunk zackwarburg $ bundle install
Fetching source index from https://gemini.atl.********.net/
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.......
Using rake (0.9.2.2) 
Using i18n (0.6.1) 
Using multi_json (1.5.0) 
Using activesupport (3.2.10) 
Using builder (3.0.4) 
Using activemodel (3.2.10) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.2.2) 
Using actionpack (3.2.10) 
Using addressable (2.3.2) 
Using mime-types (1.19) 
Using nokogiri (1.5.9) 
Using ffi (1.2.0) 
Using childprocess (0.3.6) 
Using websocket (1.0.6) 
Using libwebsocket (0.1.7.1) 
Using rubyzip (0.9.9) 
Using selenium-webdriver (2.27.2) 
Using xpath (0.1.4) 
Using capybara (1.1.4) 
Using ae_page_objects (0.1.2) 
Using american_date (1.0.0) 
Using cobravsmongoose (0.0.2) 
Using open4 (1.3.0) 
Using af_ruby (2.20.0) 
Using af_testing (0.11.0) 
Using blockenspiel (0.4.5) 
Using rack-ssl (1.3.2) 
Using json (1.7.6) 
Using rdoc (3.12) 
Using thor (0.16.0) 
Using railties (3.2.10) 
Using af_selenium (9.0.0) 
Using rest-client (1.6.7) 
Using af_bundle_testing (12.0.0) 
Using columnize (0.3.6) 
Using daemon_controller (1.0.0) 
Using fastthread (1.0.7) 
Using rbx-require-relative (0.0.9) 
Installing linecache (0.46) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/zackwarburg/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb 
Can't handle 1.9.x yet
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/zackwarburg/.rvm/rubies/ruby-1.9.3-p448/bin/ruby


Gem files will remain installed in /Users/zackwarburg/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46 for inspection.
Results logged to /Users/zackwarburg/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46/ext/gem_make.out

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

I did some poking around and tried a few different solutions but I'm really new to this stuff and am not sure how to proceed.

Upvotes: 0

Views: 929

Answers (1)

James Chevalier
James Chevalier

Reputation: 10874

Based on where the error appears, you can see that the problematic gem is linecache:

Installing linecache (0.46) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

Then, one of the lines suggests it's a problem with the Ruby version:

Can't handle 1.9.x yet

There's a bug filed for linecache stating that it's incompatible with Ruby 1.9.

You might be able to get around this by using linecache19 instead...

Upvotes: 2

Related Questions