我得到:Gem :: Installer :: ExtensionBuildError:错误:无法构建gem原生扩展

时间:2014-12-09 23:41:47

标签: ruby install bundle bundler

我在捆绑安装时收到此错误。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb creating Makefile

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1

Gem files will remain installed in /var/folders/qc/6cjh27ljxw3_t4gh_4ns6r60r0ftp6/T/bundler20141209-4208-vnxxb0/json-1.8.1/gems/json-1.8.1 for inspection.
Results logged to /var/folders/qc/6cjh27ljxw3_t4gh_4ns6r60r0ftp6/T/bundler20141209-4208-vnxxb0/json-1.8.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

我的Gemfile看起来像:     来源'https://rubygems.org'

gem 'rspec'
gem 'unirest'
gem 'nokogiri', '1.5.6'
gem 'rack', '1.2.1'
gem 'http_request.rb'
gem 'builder'
gem 'rexml-expansion-fix'
gem 'highline'
gem 'smart_colored'
gem 'jquery-rails'

有人可以告诉我发生了什么事吗?

1 个答案:

答案 0 :(得分:0)

你是小牛队吗?试试这个:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install json -v '1.8.1'