我将 aws-sdk 添加到我的Gemfile
,如下所示:gem 'aws-sdk', '~> 1.45.0'
然后继续在终端中运行bundle install
。但是,捆绑包无法正常工作,无法成功完成。
命令行提示
Building nokogiri using system libraries.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/cyrusghazanfar/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb --use-system-libraries
Building nokogiri using system libraries.
libxml2 version 2.9.0 and later is not yet supported, but proceeding anyway.
checking for xmlParseDoc() in libxml/parser.h... yes
checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes
checking for exsltFuncRegister() in libexslt/exslt.h... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling html_document.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [html_document.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/cyrusghazanfar/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /Users/cyrusghazanfar/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/nokogiri-1.6.2.1/gem_make.out
An error occurred while installing nokogiri (1.6.2.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.
的Gemfile
source 'https://rubygems.org'
gem 'rails', '4.1.1'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass'
gem 'devise', '~> 3.2.4'
gem 'paperclip', github: 'thoughtbot/paperclip'
gem 'aws-sdk', '~> 1.45.0'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
Nokogiri 在这里给我一些问题,我无法弄明白到底是什么。 有人可以帮忙吗?
答案 0 :(得分:1)
问题是make
无法找到/usr/bin/gcc-4.2
:
make: /usr/bin/gcc-4.2: No such file or directory
如果您安装了Xcode和命令行工具,则gcc
位于/usr/bin
。要解决make
问题,请为gcc-4.2
创建指向gcc
的符号链接:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2