2016-04-13 13 views
9

Rails 4アプリケーションでコマンドbundle installを実行中に次のエラーが発生しました。Rails 4でbundle installコマンドを使用してcapybara-webkitをインストールできない

> ruby -v 
ruby 2.1.8p440 (2015-12-16 revision 53160) [i386-mingw32] 

> rails --version 
Could not find gem 'capybara-webkit x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. 
Run `bundle install` to install missing gems. 

マイGemfile

... 
..... 
group :development, :localtesting, :test do 
    gem 'sqlite3',  '1.3.11' 
    gem 'byebug',  '3.4.0' 
    #gem 'web-console', '2.0.0.beta3' 
    gem 'spring',  '1.1.3' 
    gem 'i18n-tasks' 
    gem 'capybara' 
    gem 'selenium-webdriver' 
    gem 'rspec' 
    gem 'rspec-rails' 
    gem 'rspec_junit_formatter' 
    gem 'capybara-webkit' 
end 
..... 
... 

エラー

Installing capybara-webkit 1.10.1 with native extensions 

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb 
*** 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=C:/RailsInstaller/Ruby2.1.0/bin/ruby 
     --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 ' not available 

extconf failed, exit code 1 

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.10.1 for inspection. 
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/capybara-webkit-1.10.1/gem_make.out 
Using guard-minitest 2.3.1 
Using actionview 4.2.2 
Using composite_primary_keys 8.1.2 
Using friendly_id 5.1.0 
Using paper_trail 4.0.2 
An error occurred while installing capybara-webkit (1.10.1), and Bundler cannot 
continue. 
Make sure that `gem install capybara-webkit -v '1.10.1'` succeeds before 
bundling. 

注:私はすでに同様の問題Cannot install capybara-webkit gemでポストに見しようとしましたが、実行することで、解決策に従ってみました次のコマンド。しかし、次のエラーが発生しました。

> qmake -v 
'qmake' is not recognized as an internal or external command, 
operable program or batch file. 

答えて

9

インストール手順はcapybara-webkit wiki - https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkitにあります。 Qt 5.5.1(5.6はQtWebKitモジュールを個別にビルドする場合にのみサポートされます)をインストールします。

+0

私は(OSX High Sierra)これを行い、gem installはまだ動作していません: "which qmake" => "/usr/local/opt/[email protected]/bin/qmake"しかし、Gemをインストールすると私は "コマンド 'qmake' failed" – sixty4bit

+0

@ sixty4bitこれは、 'Command' qmake 'が利用できなかったというこの問題を扱うエラーではない - これは本当にそれについて聞く場所ではない。ここで提供したよりも詳細な方法であなた自身の質問を開いてください。 –

関連する問題