简体   繁体   中英

Capybara-Webkit fails

After much looking, even here on StackOverflow, I still can't seem to get the Capybara gem installed to finish my Ruby on Rails project, here's the error message I get when running

gem install capybara-webkit 

The error I get is

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/openssl@1.1/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

Any help is greatly appreciated, as always, cheers, and happy coding!

Capybara-webkit require some native extensions and does use a compiler to build them.

You're using OS X, so you have to accept the Xcode license agreement before use the compiler with:

sudo xcodebuild -license accept

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM