我知道此主题已经涵盖过,我在过去两天尝试了各种解决方案,但尚未找到成功解决此问题的方法。
当我在新项目上运行bundle install时会出现此错误。
bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.1)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.1)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.1)
Using activemodel (4.0.1)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Using activerecord (4.0.1)
Using bundler (1.3.5)
Using mini_portile (0.5.2)
Installing nokogiri (1.6.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/conormacken/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp//ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp//ports/libxml2/2.8.0/configure.log' to see what happened.
*** 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
--without-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/conormacken/.rbenv/versions/2.0.0-p247/bin/ruby
/Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:265:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `chdir'
from /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `execute'
from /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:65:in `configure'
from /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:108:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:119:in `call'
from extconf.rb:119:in `block in <main>'
from extconf.rb:109:in `tap'
from extconf.rb:109:in `<main>'
Gem files will remain installed in /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1 for inspection.
Results logged to /Users/conormacken/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling.
我最初的问题在于PG宝石,我担心我可能会让这个问题变得更糟而不是更好。我正在使用brew,OSX 1.8.5和ruby 2.0.0p247。我犯的错误是没有跟踪我试图实施的问题;道歉。有没有人有任何建议?
谢谢!
答案 0 :(得分:0)
刚刚关闭这个问题,问题实际上与Xcode有关,并且它以某种方式搞砸了。不是一个非常有用的解决方案,但需要考虑调试问题的地方。我只是重新安装了Xcode,并且这样做了。