Can I use the HOMEBREW’s QT5 and Capybara-webkit?

I want to use QtWebKit and capybara-webkit of qt5.

brew uninstall qt
Uninstalling /usr/local/Cellar/qt/4.8.4...
brew install qt5
This formula is keg-only: so it was not symlinked into /usr/local.
? /usr/local/Cellar/qt5/5.0.2: 3103 files, 140M, built in 60.9 minutes

If I force brew to create symbolic links for qt5, I can create native extensions for capybara-webkit.

brew link --force qt5
Linking /usr/local/Cellar/qt5/5.0.2... 122 symlinks created
gem install capybara -webkit -v '1.0.0'
Successfully installed capybara-webkit-1.0.0

.. but webkit_server crashed..

bundle exec rake test:integration
Errno::EADDRNOTAVAIL: Can't assign requested address-connect(2)
dyld: Library not loaded: /private/tmp/qt5-KytU/qt-everywhere- opensource-src-5.0.2/qtwebkit/lib/QtWebKit.framework/Versions/5/QtWebKit
Referenced from: /usr/local/opt/qt5/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
Reason: image not found

See full osx crash report.

I tried to install capybara-webkit using LDFLAGS and CPPFLAGS, but webkit_server still crashed.

env LDFLAGS=-L/usr/local/opt/qt5/lib \
CPPFLAGS=-I/usr/local/opt/qt5/include \< br /> gem install capybara-webkit -v '1.0.0'

NOTE: IAmNaN here… this answer worked find for El Cap and Yosemite but it is no longer relevant as of MacOS Sierra. Instead follow the instructions from 07000. To summarize…

  1. Download and install a new 07001.
  2. Edit ~/Qt5.5.1/5.5/clang_64/mkspecs/features/mac/default_pre.prf.
  3. < li>Around line 15 find and replace -find xcrun 2 with -find xcodebuild 2.

  4. Save and run PATH=~/Qt5 .5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit

Now back to our regularly scheduled answer….

I work in OSX Yosemite. The reason for the establishment of opposition to Qt5 is that some fixes were obtained in Qt4, which in some cases prevented capybara-webkit from using fonts and style sheet assets.

Comment out the capybara and capybara-webkit gems from your gem file. Then:

bundle
gem uninstall capybara-webkit
gem uninstall capybara # if it complains about dependencies'gem uninstall' them first
brew remove qt
brew remove qt5 # if you've been playing around

From a clean environment (restart your terminal):

brew tap homebrew/versions
brew install qt55
brew linkapps qt55
brew link --force qt55

Uncomment capybara and capybara-webkit in gemfile and then:

bundle install

Note: You can safely ignore the “Brewing not connected” warning issued by the brewing doctor.

I want to use Qt5’s QtWebKit and capybara-webkit.

brew uninstall qt
Uninstalling /usr/local/Cellar/qt/4.8.4...
brew install qt5
This formula is keg-only: so it was not symlinked into /usr/local.
? /usr/local/Cellar/qt5/5.0.2: 3103 files, 140M, built in 60.9 minutes

If I force brew to create symbolic links for qt5, I can create native extensions for capybara-webkit.

brew link --force qt5
Linking /usr/local/Cellar/qt5/5.0.2... 122 symlinks created
gem install capybara -webkit -v '1.0.0'
Successfully installed capybara-webkit-1.0.0

.. but webkit_server crashed..

bundle exec rake test:integration
Errno::EADDRNOTAVAIL: Can't assign requested address-connect(2)
dyld: Library not loaded: /private/tmp/qt5-KytU/qt-everywhere- opensource-src-5.0.2/qtwebkit/lib/QtWebKit.framework/Versions/5/QtWebKit
Referenced from: /usr/local/opt/qt5/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
Reason: image not found

See full osx crash report.

I tried to install capybara-webkit using LDFLAGS and CPPFLAGS, but webkit_server still crashed.

env LDFLAGS=-L/usr/local/opt/qt5/lib \
CPPFLAGS=-I/usr/local/opt/qt5/include \< br /> gem install capybara-webkit -v '1.0.0'

NOTE: IAmNaN here … This answer worked find for El Cap and Yosemite but it is no longer relevant as of MacOS Sierra. Instead follow the instructions from 07000. To summarize…

  1. Download and install a new 07001.
  2. Edit ~/Qt5.5.1/5.5/clang_64/mkspecs/features/mac/default_pre.prf.
  3. Around line 15 find and replace - find xcrun 2 with -find xcodebuild 2.
  4. Save and run PATH=~/Qt5.5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit

Now back to our regularly scheduled answer….

I work in OSX Yosemite. The reason for the establishment of opposition to Qt5 is that some fixes were obtained in Qt4, which in some cases prevented capybara-webkit from using fonts and style sheet assets.

Comment out the capybara and capybara-webkit gems from your gem file. Then:

bundle
gem uninstall capybara-webkit
gem uninstall capybara # if it complains about dependencies'gem uninstall' them first
brew remove qt
brew remove qt5 # if you've been playing around

From a clean environment (restart your terminal):

brew tap homebrew/versions
brew install qt55
brew linkapps qt55
brew link --force qt55

Uncomment capybara and capybara-webkit in gemfile and then:

bundle install

Note: You can safely ignore the “Brewing not connected” warning issued by the brewing doctor.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5219 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.