2017-08-03 5 views
1

私は、ブートストラップモーダルに含まれるいくつかのフォームを持つRails 5アプリケーションを持っています。カピバラはモーダルコンテンツの読み込みに問題があります。他のいくつかのスタックオーバーフロー記事を読むことから、私はcapybara-webkit gemをインストールする必要があるようです。ただし、インストールに問題があります。私の最初のオンRails - capybara-webkitをインストールする際のトラブル

は、私が言った誤りだ、インストールします。

Command 'qmake ' not available 

extconf failed, exit code 1 

Gem files will remain installed in 
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capybara-webkit-1.14.0 for inspection. 
Results logged to 

An error occurred while installing capybara-webkit (1.14.0), and Bundler cannot continue. 
Make sure that `gem install capybara-webkit -v '1.14.0'` succeeds before bundling. 

少し周りを見ると、私がQTをインストールする必要がありそうです。だから私はこの記事からの命令を使用してインストールしようとした:https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit

私はOS Xエルキャピタン日午前、ので、私は走った:

brew install [email protected] 

その後、私は指示に従って、コマンドラインにこれ​​を入力した(I 。)私が台無しにここがかもしれ信じる:

​​

私は再び宝石をインストールしようとした、とまったく同じ問題を抱えて:

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

current directory: 
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capybara-webkit-1.14.0 
/Users/johnseabolt/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170803-82842-1br8b1h.rb 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=/Users/johnseabolt/.rbenv/versions/2.3.1/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 ' not available 

extconf failed, exit code 1 

Gem files will remain installed in 
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capybara-webkit-1.14.0 for inspection. 
Results logged to 


An error occurred while installing capybara-webkit (1.14.0), and Bundler cannot continue. 
Make sure that `gem install capybara-webkit -v '1.14.0'` succeeds before bundling. 

これは動作しませんか?助けて!

答えて

0

echoの例では、.bashrcにエクスポートを追加したばかりですが、現在のPATH環境変数にロードされていることを確認する必要があります。それを行うための最も簡単な方法は、現在のシェルを閉じて、新しいものを開くことです、しかし、私は一般的にそれが簡単にちょうどこのすべて言われて、capybara-webkitはそのJSにはかなり時代遅れになってきた

brew link --force [email protected] 

で行くことに見つけましたほとんどの現代的なアプリケーションをテストするためには、トランスリンギングとポリフィリングが必要です。 JS依存アプリをCapybaraでテストするための初心者として、クロムを含むセレンを使用する方がよいでしょう。capybara-webkit

の代わりに https://github.com/teamcapybara/capybara#configuring-and-adding-drivers-
関連する問題