未能构建本机Gem扩展



我正在尝试运行"bundle install",但不断收到以下错误消息。。。

~/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.

我做了一些尝试,尝试了一些不同的解决方案,但我对这些东西真的很陌生,不知道如何继续。

根据错误出现的位置,您可以看到有问题的gem是linecache:

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

然后,其中一行表明Ruby版本存在问题:

Can't handle 1.9.x yet

有一个为linecache提交的错误指出它与Ruby1.9不兼容。

您可以通过使用linecache19来解决这个问题。。。

最新更新