2017-04-03 85 views
0

使用MacOSX 10.12.4,今天第一次运行了fastlane slather操作。当fastlane尝试安装gem时,它会失败。综观mkmf.log,在它生成的FASTLANE错误的简称,它显示了这个建筑引入nokogiri时:fastlane slather操作无法安装gem

In file included from conftest.c:1: 
In file included from /Users/mstoner/.fastlane/bin/bundle/include/ruby-2.2.0/ruby.h:33: 
In file included from /Users/mstoner/.fastlane/bin/bundle/include/ruby-2.2.0/ruby/ruby.h:29: 
/Users/mstoner/.fastlane/bin/bundle/include/ruby-2.2.0/ruby/defines.h:26:10: fatal error: 'stdio.h' file not found 
#include <stdio.h> 
^ 
1 error generated. 

看来,建设引入nokogiri宝石的依赖时,它无法找到stdio.h中。我可以使用非fastlane脚本中的系统slather gem(“install gem slather”)。我已经安装了XCode命令行工具,重新启动并尝试以sudo方式运行fastlane命令,但都没有发现错误。 nokogiri应该在哪里寻找stdio.h?

回答

2

看起来像您正在使用fastlane的预打包(包含,brew)版本,但是这对于需要本地ruby扩展的gem依赖关系存在已知问题。对于如何解决它正在进行的调查(在这里:https://github.com/fastlane/fastlane/issues/8431#issuecomment-284428794

,因为这是没有固定/释放,你可以通过gem安装FASTLANE(最好使用rvm/rbenv

请参阅:https://github.com/fastlane/fastlane#installation(附加设置方法)

+0

谢谢@ Helmut-Januschka,这正是我最终需要做的 - 使用rvm的直线rubygem版本的fastlane来保持清洁。这解决了这个问题 – stonedauwg