简体   繁体   中英

Cannot install capybara-webkit on Mac OS

I've been following instructions to install capybara-webkit on Mac OS X 10.8. I've downloaded and installed:

  • qt-mac-opensource-4.8.5
  • qt-mac-opensource-4.8.5-debug-libs
  • Xcode Command Line tools + I later installed full XCode 5.0
  • qt4 using brew

Not necessary in this order

Running gem install capybara-webkit throws an error

# lots of output omitted
/Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1620:in `stat': No such file or directory - src/webkit_server (Errno::ENOENT)
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1620:in `block in fu_each_src_dest'
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1633:in `fu_each_src_dest0'
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1618:in `fu_each_src_dest'
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:466:in `cp'
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/lib/capybara_webkit_builder.rb:76:in `build'
    from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/lib/capybara_webkit_builder.rb:88:in `build_all'
    from extconf.rb:2:in `<main>'


Gem files will remain installed in /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/./gem_make.out

I've tried reinstalling qt, installing XQuartz-2.7.4, ... without luck. There is no trace of similar problems on Github :(

Here's some additional info should it help someone figure out the cause - http://pastie.org/8355714 .

Feeling silly answering my own question but looks like I needed to actually run XCode and accept their terms and conditions. After doing that running gem install capybara-webkit worked.

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