安装/捆绑gem unf_ext -v'0.0.6'时出错

Cor*_*nne 9 ruby gem bundle ruby-on-rails bundler

我正在尝试捆绑intall unf_ext -v '0.0.6'但我一直收到此错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling unf.cc
In file included from unf.cc:1:
In file included from ./unf/normalizer.hh:4:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
         ^
1 error generated.
make: *** [unf.o] Error 1

make failed, exit code 2
Run Code Online (Sandbox Code Playgroud)

我跑了gem update --system,brew install coreutils但我仍然得到同样的错误.

更新:回答Apple Developer
下载并安装.无需卸载任何东西. commandlinetoolsosx10.10forxcode6.2.dmg

Dan*_*G2k 8

这样做对我有用:

echo '#define _LIBCPP_ASSERT(x, m) ((void)0)' | sudo tee -a /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug > /dev/null
Run Code Online (Sandbox Code Playgroud)

然后又跑bundle了.

并且,由于这仅仅是Apple发布补丁之前的临时修复,因此请删除新创建的文件:

sudo rm /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug
Run Code Online (Sandbox Code Playgroud)


nru*_*uth 7

这是新的xcode工具中的一个错误.它打破了我的情况下的事件机器.有关使用虚拟文件和重新安装链接的答案,请参阅更新OSX命令行工具6.3后,请参阅缺少C++标头<__ debug>.我降级到6.2,问题消失了.