Cannot install capybara-webkit on Windows XP using the tutorail

261 views
Skip to first unread message

A B

unread,
Jul 2, 2013, 6:53:57 PM7/2/13
to capybar...@googlegroups.com
Hello.

I can't install capybara-webkit on my Windows XP.

At first, I tried gem install capybara-webkit, and I got a known error, I didn't have Qt at all in my machine:

C:\Documents and Settings\User>gem install "capybara-webkit"
Fetching: capybara-webkit-1.0.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.
    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
Command 'qmake -spec win32-g++' not available

Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0/./gem_make.out


Then I read questions and answers here and on Stackoverflow.com and did everything that is said here https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit. I downloaded and installed Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) and made all the necessary PATH changes. Here are my steps beginning from 7 of the tutorial:
 
C:\Documents and Settings\User>git clone git://github.com/thoughtbot/capybara-webkit.git
Cloning into 'capybara-webkit'...
remote: Counting objects: 4692, done.
remote: Compressing objects: 100% (2965/2965), done.
remotReceiving obje: Total 4692 (delta 2349), reused 3898 (delta 1624)ects: 100% (4692/4
Receiving objects: 100% (4692/4692), 961.98 KiB | 387 KiB/s, done.
Resolving deltas: 100% (2349/2349), done.

C:\Documents and Settings\User>cd capybara-webkit

C:\Documents and Settings\User\capybara-webkit>bundle install
Resolving dependencies...
Using rake (0.9.2)
Using addressable (2.3.2)
Using bundler (1.3.5)
Using appraisal (0.4.0)
Using mime-types (1.22)
Using nokogiri (1.5.9)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using json (1.8.0)
Using capybara-webkit (1.0.0) from source at .
Using ffi (1.2.0)
Using childprocess (0.3.6)
Using diff-lcs (1.1.2)
Using websocket (1.0.6)
Using libwebsocket (0.1.7.1)
Using subexec (0.0.4)
Using mini_magick (3.2.1)
Using multi_json (1.5.0)
Using rack-protection (1.3.2)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.27.2)
Using tilt (1.3.3)
Using sinatra (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

C:\Documents and Settings\User\capybara-webkit>cd C:\RailsInstaller\DevKit

C:\RailsInstaller\DevKit>devkitvars.bat
Adding the DevKit to PATH...

C:\RailsInstaller\DevKit>cd C:\Documents and Settings\User\capybara-webkit

And here is an error:

C:\Documents and Settings\User\capybara-webkit>bundle exec rake build
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `load': cannot load such file -- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications/bin/rake (LoadEr
ror)
        from C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `<main>'


There is no any 
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications/bin/rake
 
directory in 

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications


I use:
Rails 3.2.13
ruby 1.9.3p392 (2013-02-22) [i386-mingw32]


Was something changed since that tutorial? How may I solve the issue?

Joe Ferris

unread,
Jul 3, 2013, 9:58:35 AM7/3/13
to capybar...@googlegroups.com
This looks like something is messed up with your Ruby/RubyGems/rake install. Can you paste the contents of C:/RailsInstaller/Ruby1.9.3/bin/rake?
--
You received this message because you are subscribed to the Google Groups "capybara-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capybara-webk...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

A B

unread,
Jul 4, 2013, 9:01:13 AM7/4/13
to capybar...@googlegroups.com
This is C:/RailsInstaller/Ruby1.9.3/bin/rake as is:

#! ruby
#
# This file was generated by RubyGems.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/
    version = $1
    ARGV.shift
  end
end
gem 'rake', version
load Gem.bin_path('rake', 'rake', version)        ##  this is 23rd line of the file mentioned in the error


I used RailsInstaller to install Ruby on my XP. It has its Devkit and I use it to build capybara-webkit.


Could you please answer these question? Because they are not clear in the tutorial:

8) Clone latest version of capybara-webkit from Github:

Q: Where do I need to clone capybara-webkit? In which directory? Should it be C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems (all the gems are located here)? Or may it be any directory, for example C:\Documents and Settings\User?


... you need is Qt libraries v4.8.4 for Windows or higher

Q: I installed Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB). May it be 5.0.2? Or should it be exactly v4.8.4?


Download the latest Ruby version and DevKit from here...

Q: The tutorial mentions RubyInstaller but I have been using RailsInstaller. I tried to use RubyInstaller but I can't because of my unsuitable CPU  (https://groups.google.com/d/msg/rubyinstaller/iUrmiLDO3LI/uJmlH3IQdqsJ). So may my RailsInstaller (its Devkit) be not compatible with capybara-webkit?


Also I posted a question on Stackoverflow about bundle install command. It seems it doesn't work for my subsequent attempts. It says the gems are installed but bundle show says they are deleted. May this cause an issue?


Thank you.


среда, 3 июля 2013 г., 16:58:35 UTC+3 пользователь Joe Ferris написал:

Joe Ferris

unread,
Jul 10, 2013, 1:53:25 PM7/10/13
to capybar...@googlegroups.com
Hey,

Sorry for the delay. This fell off my radar.

You should be fine with 5.0.2. I've heard reports of issues with 5.1, but the 5.0.x release is supported.

I've never developed on Windows, and I'm not familiar with the differences between RailsInstaller and RubyInstaller. However, looking at your setup and the messages you're getting, I think this is a general issue with the way bundler and Ruby are setup and not specifically related to capybara-webkit. You may have more luck asking on the RailsInstaller mailing list.

-Joe
--
Reply all
Reply to author
Forward
0 new messages