2017-10-19 103 views
0

经过一番寻找,即使在这里,在计算器上,我似乎仍不能得到安装完成我的Ruby on Rails项目的水豚的宝石,这里的错误信息运行水豚,Webkit的失败

gem install capybara-webkit 
当我得到

我得到的错误是

current directory: /Users/montana/.rvm/gems/ruby-2.4.1/gems/capybara-webkit-1.14.0 
/Users/montana/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20171019-31585-1203ped.rb extconf.rb 
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild. 
*** 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 
    --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/montana/.rvm/rubies/ruby-2.4.1/bin/$(RUBY_BASE_NAME) 
    --with-gl-dir 
    --without-gl-dir 
    --with-gl-include 
    --without-gl-include=${gl-dir}/include 
    --with-gl-lib 
    --without-gl-lib=${gl-dir}/lib 
    --with-zlib-dir 
    --without-zlib-dir 
    --with-zlib-include 
    --without-zlib-include=${zlib-dir}/include 
    --with-zlib-lib 
    --without-zlib-lib=${zlib-dir}/lib 
Command 'qmake LIBS\ \+\=\ -L/usr/local/opt/libyaml/lib\ -L/usr/local/opt/readline/lib\ -L/usr/local/opt/libksba/lib\ -L/usr/local/opt/[email protected]/lib' failed 

extconf failed, exit code 1 

Gem files will remain installed in /Users/montana/.rvm/gems/ruby-2.4.1/gems/capybara-webkit-1.14.0 for inspection. 
Results logged to /Users/montana/.rvm/gems/ruby-2.4.1/extensions/x86_64-darwin-17/2.4.0/capybara-webkit-1.14.0/gem_make.out 

任何帮助非常感谢,一如既往,欢呼声和愉快的编码!

+0

水豚,WebKit的依赖于从Qt的WebKit的执行情况。你读过https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#xcode-80吗? –

+0

嘿凯文,是的,我已经安装了QT,并将其链接。这就是为什么它让我难倒。我想我可以尝试使用brew(我的OS X的包管理器)并重新安装,然后再次尝试符号链接? – Montana

回答

0

Capybara-webkit需要一些本地扩展,并使用编译器来构建它们。

您使用的OS X,所以你必须之前接受Xcode的许可协议,使用编译器:

sudo xcodebuild -license accept 
+0

谢谢你的建议spuyet,是的,我跑了,并得到“xcode选择:错误:工具'xcodebuild'需要Xcode,但活动开发人员目录'/ Library/Developer/CommandLineTools'是一个命令行工具实例” – Montana

+0

你有没有安装Xcode?如果没有,请去应用商店下载:) – spuyet

+0

我真的需要Xcode吗?我安装了CLI工具,我认为这足够了,当你安装CLI工具时,你接受这个协议。再次,我真的很感激帮助spuyet。 – Montana