无法安装gem capybara-webkit

时间:2014-05-21 09:09:15

标签: ruby-on-rails ruby-on-rails-4 gem

当我们安装gem:$ gem install capybara-webkit时,我们得到以下错误,请帮助;

  $ gem install capybara-webkit
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
    ERROR: Failed to build gem native extension.

    /home/zapbuild/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
Command 'qmake -spec linux-g++ ' not available

Makefile not found

Gem files will remain installed in /home/zapbuild/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.1.1 for inspection.
Results logged to /home/zapbuild/.rvm/gems/ruby-2.1.0/extensions/x86-linux/2.1.0/capybara-webkit-1.1.1/gem_make.out

1 个答案:

答案 0 :(得分:4)

请试试这个

首先运行此命令

sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui

之后运行此命令

gem install capybara-webkit -v '0.11.0'