Mac OS 10.14 Mojave + qt5.5 + gem capybara-webkit

mac os catalina
mac os mojave vs catalina
mac os versions
mac os high sierra
mac os mojave download iso
mac os mojave compatibility
latest mac os
mac os sierra

My config is MAC Mojave v10.14.

I try to install gem Capybara-webkit -v '1.15.0' which need qt5.5, but qt5.5 has been dropped of the homebrew and it is not compatible with Xcode v10.

I try this :

  • Uninstall Xcode v10
  • Install Xcode 9.4.1, found in developer.apple.com/
  • Install qt5.5, I have found it in the archives on qt.io/
  • Run bundle

But it fail, my error is with the gem capybara-webkit -v '1.15.0':

Fetching capybara-webkit 1.15.0
Installing capybara-webkit 1.15.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: 
/Users/thomas/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/capybara- 
webkit-1.15.0
/Users/thomas/.rbenv/versions/2.4.4/bin/ruby -r ./siteconf20181005-763-1bppnfh.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
--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/thomas/.rbenv/versions/2.4.4/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 ' failed

extconf failed, exit code 1

 Gem files will remain installed in 
/Users/thomas/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/capybara-webkit-1.15.0 for inspection.
Results logged to /Users/thomas/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/extensions/x86_64- darwin-18/2.4.0-static/capybara-webkit-1.15.0/gem_make.out

An error occurred while installing capybara-webkit (1.15.0), and Bundler 
cannot continue.
Make sure that `gem install capybara-webkit -v '1.15.0' --source 
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
capybara-webkit

Next, I did:

sudo xcodebuild -license agree

But the error persists...

Thank you for your help !

macOS, Apple today previewed macOS Mojave, the latest version of the world's most advanced desktop operating system. How to upgrade to macOS Mojave If you have hardware or software that isn't compatible with macOS Catalina, you might be able to upgrade to macOS Mojave. Check compatibility

As described on the capybara-webkit wiki, capybara-webkit depends on Qt 5.5. "Qt 5.5 is the last version of Qt that capybara-webkit will support. The Qt project has dropped the WebKit bindings from binary releases in 5.6."

To install Qt 5.5 follow the instructions from the wiki. For Mojave, the instructions are the following.

brew update
cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core
git checkout 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 Formula/qt@5.5.rb
brew install qt@5.5
echo 'export PATH="$(brew --prefix qt@5.5)/bin:$PATH"' >> ~/.bashrc

You can confirm this step worked by running:

$ which qmake
/usr/local/opt/qt@5.5/bin/qmake

Next, you need to install Xcode 9.4. Xcode 10 is not compatible with Qt 5.5. Xcode 9.4 can be downloaded from the Apple developer portal. This is a 4GB download and takes about 30 minutes to download and install. You can verify it's correctly installed by running the following:

$ /usr/bin/xcodebuild -version
Xcode 9.4.1
Build version 9F2000

If this doesn't work, it may be because you have only the Command Line Tools installed instead of Xcode, in which case you should make sure you downloaded the right version of Xcode. Or the Xcode folder may set incorrectly. If so, you can fix this using xcode-select, which will specifiy the folder in which xcodebuild runs:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

When Xcode is finally installed, locate it in your Applications folder, open it, and agree to the license. Then try reinstalling capybara-webkit.


Disclaimer: I came up with the above answer from compiling multiple questions and answers and trying to remember the order in which I ran commands on my local machine. I may have accidentally omitted some steps.

Apple introduces macOS Mojave, macOS Mojave (version 10.14) is the fifteenth major release of macOS, Apple Inc.​'s desktop operating system for Macintosh computers. Mojave was announced  macOS Mojave (/ moʊˈhɑːvi, mə -/ mo-HAH-vee) (version 10.14) is the fifteenth major release of macOS, Apple Inc. 's desktop operating system for Macintosh computers. Mojave was announced at Apple's Worldwide Developers Conference on June 4, 2018, and was released to the public on September 24, 2018.

macOS Mojave, macOS 10.14 requires at least 14.3GB of hard drive space to be installed, as that's what was required last year. To be on the safe side, keep at  MacOS Mojave 10.14.1 free Download: MacOS Mojave is the latest operating system for the Mac lineup of hardware from apple which includes MacBooks, iMacs, Mac Minis and more from Apple. The new addition to the Macbook Operating Systems launched on 24th September of the year 2018.

You need Xcode 9.4.1 to install qt@5.5 as it's not compatible with Xcode 10. Homebrew has deleted the qt@5.5 from their core tap so to install it you need to run the following before:

brew update
cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core
git checkout 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 Formula/qt@5.5.rb
brew install qt@5.5

9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 is the parent commit of 360923286c0f1a6a1325ada578df030bf579009f where they removed qt@5.5 so this command rollbacks to the parent commit and checkout the needed formula file.

macOS 10.14 Mojave: release date, news and features, Upgrading to macOS 10.14 Mojave. The following steps will walk you through upgrading your Mac's operating system  So before you download and install macOS 10.14 Mojave, make sure your Mac is backed up. For information on how to do this, head over to our ultimate guide to backing up your Mac . How to download

I could install qt@5.5 on Mojave with this:

brew install qt@5.5 --force-bottle

With capybara-webkit, I temporarily use this:

gem "capybara-webkit", git: "https://github.com/emilyst/capybara-webkit.git", ref: "9c9af833656f095667e8522004dae017d423d37d"

How to Download and Install macOS Mojave, What are macOS Mojave's major new features? The features that Apple highlighted during WWDC focused on the user interface. They'll make  macOS 10.14 Mojave is the latest announced version of Mac operating systems. Like past macOS releases, Apple added more optimizations, updates, and new features to Mojave. Apple’s Mojave page highlights some of the fascinating changes to the Mac operating system. The full version of Mojave was officially released on September 24th.

macOS 10.14 Mojave features, specifications, requirements, FAQ , Apple, Mac macOS, Mojave, OS X, macOS 10.14, Macintosh, how IDG. Apple's macOS 10.14 Mojave is available now, and after months of  Word, Excel, PowerPoint, Outlook, OneDrive, Skype for Business, and OneNote will install and run on macOS 10.14 Mojave. Microsoft fully supports Office 2016, Office 2019 and Microsoft 365 for Mac on 10.14 Mojave when you have the following Office updates installed: Microsoft 365/2019 - Build 16.17.0 or later Office 2016 - Build 16.16.2 or later

Why you should install macOS Mojave and how to use it , macOS Mojave 10.14 is an excellent upgrade, with dozens of new conveniences for managing documents and media files, iOS-style apps for Stocks, News, and  10.14.1/macOS Extended (Journaled) volumes. The Mojave 10.14.1 update does NOT install properly on unsupported machines, and could result in an unbootable OS. If you want to install the 10.14.1 update (and are not currently running 10.14.1), perform the following steps: • Download the latest version of Mojave Patcher

Apple macOS Mojave Review, Even with the broad scope of updates contained herein, however, 10.14 represents what is arguably the most focused macOS release in recent 

Comments
  • Please post your solution as an answer to your question. You can then accept your own answer. That way it is easier for people to search if they have similar issues.
  • What's annoying now is they removed Qt 5.5 from their website. Link is broken
  • The full manual here github.com/thoughtbot/capybara-webkit/wiki/… It has useful notes. Helped me to install capybara-webkit on Mojave
  • I get an error running brew install qt@5.5 on OS X Mojave: Error: qt@5.5: unknown version :mountain_lion - following the update here: stackoverflow.com/questions/54499893/… seems to have resolved the problem
  • I still have problems to install Qt5.5. ../src/corelib/global/qglobal.h:39:12: fatal error: 'cstddef' file not found # include <cstddef>
  • Are you using home brew?
  • Yes, I have reinstall Mojave from scratch and install Xcode 9.4.1 and follow this steps but I still unlucky. I got the message that Xcode and CommandLineTools are outdated so I can install qt@5.5.
  • NOTE: If you got error fatal: reference is not a tree: 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97, use git fetch --unshallow to complete git history. NOTE: If you get Error: qt@5.5: unknown version :mountain_lion, comment line #25 in Formula/qt@5.5.rb More details: github.com/thoughtbot/capybara-webkit/wiki/…
  • This didn't work for me. ``` Error: No available formula with the name "qt@5.5" ==> Searching for a previously deleted formula (in the last month)... qt@5.5 was deleted from homebrew/core in commit 360923286c: qt@5.5: delete ```