2016-11-08 30 views
6

Tôi đã cố gắng để cài đặt các viên ngọc Capybara-Webkit với bundler và sau khi làm theo hướng dẫn sau: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#macos-sierra-1012Không thể cài đặt Capybara-webkit với OS X Sierra

tôi tiếp tục chạy vào lỗi của Makefile không được tìm thấy . Tôi đã cập nhật Homebrew, hệ thống đá quý, và cập nhật Xcode 8 với các công cụ cli để không có kết quả. Sẽ thực sự đánh giá cao sự giúp đỡ nào!

sudo gem install capybara-webkit PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit 
Password: 
Building native extensions. This could take a while... 
ERROR: Error installing capybara-webkit: 
    ERROR: Failed to build gem native extension. 

    /Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-m00680.rb extconf.rb 
*** 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 
    --without-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/caren/.rbenv/versions/2.2.3/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 ' not available 

extconf failed, exit code 1 

Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection. 
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out 
ERROR: Could not find a valid gem 'PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/caren/.nvm/versions/node/v5.4.0/bin:/Users/caren/.rbenv/shims:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/heroku/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin:/Users/caren/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin' (>= 0) in any repository 
ERROR: Could not find a valid gem 'gem' (>= 0) in any repository 
ERROR: Could not find a valid gem 'install' (>= 0) in any repository 
ERROR: Possible alternatives: installr, instant, instana, instacli, instapi 
Building native extensions. This could take a while... 
ERROR: Error installing capybara-webkit: 
    ERROR: Failed to build gem native extension. 

    /Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-97n2eh.rb extconf.rb 
*** 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 
    --without-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/caren/.rbenv/versions/2.2.3/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 ' not available 

extconf failed, exit code 1 

Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection. 
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out 
+0

cách bạn cài đặt QT? – fabersky

+0

bạn nên chạy 'PATH =/Users/caren/Qt5.5.1/5.5/clang_64/bin: $ PATH gem cài đặt capybara-webkit' không phải' gem install capybara-webkit PATH =/Users/caren/Qt5.5.1/5.5/clang_64/bin: $ PATH gem install capybara-webkit' và khi/nếu không nhìn vào mkmf.log được đề cập trong thông báo lỗi để xem lỗi nào đang xảy ra –

+1

http://superuser.com/questions/256232/how -can-i-get-qmake-on-mac-os-x –

Trả lời

9

Sau đây đã làm các trick cho tôi (sử dụng Homebrew):

brew install qt5 --with-qtwebkit 
brew link --force qt5 
gem install capybara-webkit 

Lưu ý: Nó sẽ mất một thời gian để cài đặt bước đầu tiên, và bạn sẽ cần phải có Xcode cài đặt.

+1

Cảm ơn Mike! Đã thử các bước của bạn và làm việc cho tôi. :) –

+0

Cảm ơn bạn đời! Mất một thời gian dài để biên dịch/thực hiện nhưng đã làm việc ra ngoài. Rất nhiều Kudo! :) – Autodidact

+0

không đùa về lệnh đầu tiên đó mất một thời gian rất dài. tất cả 3 lệnh làm việc như một say mê! cảm ơn bạn đời !! – LuAndre

Các vấn đề liên quan