我是ruby的新手,但在尝试安装capybara以在我的系统上运行测试时,我收到以下错误.我在运行OSX
my_app$ gem install capybara-webkit Building native extensions. This could take a while... ERROR: Error installing capybara-webkit: ERROR: Failed to build gem native extension. /Users/joe/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb Gem files will remain installed in /Users/joe/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.7.2 for inspection. Results logged to /Users/joe/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.7.2/./gem_make.out
这是gem_make.out的结果
/Users/joe/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
jefflunt.. 96
尝试通过自制软件安装libqt.
$ brew install qt@5.5
如果您安装qt,则有效.我跑'brew install qt' (47认同)
Suborx.. 89
Linux解决方案.
Ubuntu的
sudo apt-get install libqt4-dev libqtwebkit-dev
Debian稳定
sudo apt-get install libqt4-dev
Fedora的
yum install qt-webkit-devel
Fedora 16
yum install qtwebkit-devel
这对我有用,也许对某人也有帮助.
尝试通过自制软件安装libqt.
$ brew install qt@5.5
Linux解决方案.
Ubuntu的
sudo apt-get install libqt4-dev libqtwebkit-dev
Debian稳定
sudo apt-get install libqt4-dev
Fedora的
yum install qt-webkit-devel
Fedora 16
yum install qtwebkit-devel
这对我有用,也许对某人也有帮助.
brew install qt@5.5
然后
gem install capybara-webkit -v '0.7.2'
-v 0.7.2是选择版本项目要求你安装.请注意,从http://developer.qt.nokia.com/wiki/Support_for_Mac_OS_X安装qt 需要设置PATH变量.
在安装QT后尝试在CentOS 6上安装capybara-webdriver时遇到了这个问题.
通过将以下内容添加到我的PATH环境变量中来解决此问题
/usr/lib64/qt4/bin/
对于OSX,我不得不这样做
brew install qt
然后
sudo gem install capybara-webkit -v '0.7.2'
没有sudo就会出错