Yucheng Guo
Yucheng Guo

Reputation: 105

Installing capybara-webkit for Ruby on Rails

I am trying to install gem capybara-webkit but keeps getting these errors:

C:\Sites\helios-master>gem install capybara-webkit -v '1.9.0'
Fetching: capybara-webkit-1.9.0.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
        ERROR: Failed to build gem native extension.

    current directory: C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.9.0
C:/RailsInstaller/Ruby2.2.0/bin/ruby.exe -r ./siteconf20161006-24264-1bccbjk.rb extconf.rb
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2
Command 'make' failed

current directory: C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.9.0
make "DESTDIR=" clean
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [sub-src-webkit_server-pro-clean-ordered] Error 2

current directory: C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.9.0
make "DESTDIR="
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2

make failed, exit code 2

Gem files will remain installed in C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.9.0 for inspection.
Results logged to C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/capybara-webkit-1.9.0/gem_make.out

I am on windows 10 platform. The ruby on rails works fine because I tested the demo app. I also installed the DevKit and added Qt, Devkit into environment variables. Anyone who can helps me out this would be a big hero!!!

Upvotes: 0

Views: 296

Answers (1)

Ozesh
Ozesh

Reputation: 6984

Here is quick fix that I implemented to solve my problem:

Step 1 : Head over to https://github.com/thoughtbot/capybara-webkit

Step 2 : Download a zip or clone the repo to your local from the master branch.

Step 3 : Open your Gemfile and update the gem configs as follows

gem "capybara-webkit", path: 'Path-To-The-Plugin-In-Your-Local-Machine\capybara-webkit-master'

Step 4 : Try running the bundle install and see if works. That's it.

Upvotes: 1

Related Questions