ruby-on-rails - Gem unf_ext 未能构建 gem native 扩展

标签 ruby-on-rails ruby gem

环境 => Mac。操作系统优胜美地。

我有一个项目使用 ruby​​ 2.1.3 。 但是当我捆绑安装时,出现了一个我无法修复的错误。 gem unf_ext 有问题

这是我的终端消息:

$ gem install unf_ext -v '0.0.6'
Building native extensions.  This could take a while...
ERROR:  Error installing unf_ext:
ERROR: Failed to build gem native extension.

/Users/vincent/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb
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

Gem files will remain installed in /Users/vincent/.rvm/gems/ruby-2.1.3/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/vincent/.rvm/gems/ruby-2.1.3/extensions/x86_64-darwin-14/2.1.0-static/unf_ext-0.0.6/gem_make.out 

我尝试 brew update 和 xcode select install 但还是不行。 有什么建议吗?

最佳答案

这是新的 xcode 工具中的一个错误。就我而言,它破坏了 eventmachine。参见 Missing C++ header <__debug> after updating OSX Command Line Tools 6.3有关虚拟文件和重新安装链接的答案。我降级到 6.2,问题消失了。

来源:Error installing/bundling gem unf_ext -v '0.0.6'

关于ruby-on-rails - Gem unf_ext 未能构建 gem native 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29602463/

相关文章:

ruby-on-rails - 获取一个类别中所有帖子的最后评论

ruby-on-rails - 使用查询字符串参数进行 Rails 操作缓存

ruby - 计算 GitHub 热度分数

mysql - 通过rails session 参数过滤MySQL数据

javascript - TypeError : $(. ..).selectize 不是函数

ruby-on-rails - therubyracer gem 安装错误 - mac 10.9

ruby-on-rails - environment.rb 中缺少 Rails 路径名

ruby-on-rails - 以编程方式处理 ActiveJob 队列

ruby-on-rails - rails : Can't verify CSRF token authenticity

ruby - irb 使用 rbenv 加载错误的 ruby​​ 和 gem 路径