我正在尝试通过参考链接在OS-x小牛上安装calabash以实现自动化:(https://github.com/calabash/calabash-ios)
我已经安装了最新版本的ruby,homebrew,rbenv。
请注意该命令
homebrew doctor
只给我一个警告:
Warning: Xcode is installed to a directory with a space in the name.
This will cause some formulae to fail to build.
我无法删除此警告。也有论坛认为这可能是无害的。
连续2天在解决安装问题后,
我被困在这里,我得到以下错误:
nitzs-iMac:tabbedapp nitzarg$ sudo gem install calabash-cucumber
Password:
Building native extensions. This could take a while...
ERROR: Error installing calabash-cucumber:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR="
compiling gherkin_lexer_ar.c
ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [-Wreturn- type]
}
^
ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable]
static const int lexer_en_main = 1;
^
2 warnings generated.
linking shared-object gherkin_lexer_ar.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [gherkin_lexer_ar.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin- 2.12.2/ext/gherkin_lexer_ar/gem_make.out
我假设安装失败,因为终端无法识别calabash命令。
我需要知道为什么会出现错误?它是一个特立独行的问题吗?还是Xcode-5问题?
任何帮助或建议,将不胜感激。谢谢。
最佳答案
我为您查看了calabash-ios Google小组,我认为您可以找到解决方案
尝试像这样安装
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install calabash-cucumber
如果失败,则可以尝试将xcode从5.1降级到以前的(首选项->位置)之一。
和参考link