A successful How To Install capybara-webkit on windows instance

3,621 views
Skip to first unread message

TJ Murphy

unread,
Dec 6, 2012, 6:41:19 AM12/6/12
to capybar...@googlegroups.com

I'm new at Ruby (and this sort of thing in general).  

I needed capybara-webkit for an app I'm working on and spent a lot of time trying to get

Compiling and Installing a capybara-webkit gem on a win7 x64 system

1)      From http://rubyinstaller.org/downloads/

Download:

Ruby 1.9.3-p327

DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe

2)      Install these downloads in the following local directories

C:\Ruby193

C:\DevKit

3)      From http://qt-project.org/downloads

                Download:

                                Qt libraries 4.8.4 for Windows (minGW 4.4, 317 MB)

4)      Install this download in the following local directory:

                                C:\Qt\4.8.4

5)      Run devkit installation scripts and test installation. 

See: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

 

6)      Update some system paths

From ‘Start’, right click ‘Computer’, click ‘Advanced System Settings’, [if prompted, allow systemadvancedproperties.exe to run], click ‘Advanced’ tab, click ‘Environment variables…’ button, select ‘Path’ under user variables, click ‘edit’, and enter the following: C:\Ruby193\bin; c:\qt\4.8.4\bin;c:\devkit;c:\devkit\bin

 (I’m not sure if any of these were necessary, but these were my Paths when I got this to finally work)

7)      Perform the Frommel workaround:

1) open the qmake.conf of your platform (for me its C:\Qt\4.8.3\mkspecs\win32-g++)

2) search for QMAKE_IDC

3) add the following line after the QMAKE_IDC line:

QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe

4) save file and clsoe

 

See:

https://bugreports.qt-project.org/browse/QTBUG-27237

 

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

$ git clone git://github.com/thoughtbot/capybara-webkit.git

9)      Bundle/Install capybara-webkit version:

$ cd ruby193\capybara-webkit

$ bundle install

10)   Access the full Msys/MinGW environment:

$ cd devkit

$ devkitvars.bat

This step was crucial.  No matter what I tried, I couldn’t compile capybara-webkit without it.  Running devkitvars was the secret sauce for my set up.

See: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

 

11)   In same cmd session as (10) compile capybara-webkit:

$ cd ruby193\capybara-webkit

$ bundle exec rake build

 

I guess for each instance you need to compile something like capybara-webkit, run the devkitvars.bat first.

 

12)   Intall the capybara-webkit gem:

$ gem install capybara-webkit

 

 

 

 

 

 

                                

TJ Murphy

unread,
Dec 6, 2012, 6:50:19 AM12/6/12
to capybar...@googlegroups.com
I meant to end by saying I hope somebody out there finds this recipe useful.       

Joe Ferris

unread,
Dec 6, 2012, 10:59:57 AM12/6/12
to capybar...@googlegroups.com
Hey TJ,

Thanks for writing all that up. We have user-editable documentation for compiling capybara-webkit here: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit

Could you flesh out the Windows section a bit?

Thanks,
-Joe
Message has been deleted

TJ Murphy

unread,
Dec 8, 2012, 7:38:56 AM12/8/12
to capybar...@googlegroups.com
cool!

On Friday, December 7, 2012 12:33:32 PM UTC-5, Jamshid Asatillayev wrote:
Thank you very much!!!! this is what I'm looking for!

Works like charm!!!
Message has been deleted

A B

unread,
Jul 3, 2013, 7:07:45 AM7/3/13
to capybar...@googlegroups.com
Where do I need to be (in what directory) to clone capybara-webkit?
Or in what directory do I need to clone it?



четверг, 6 декабря 2012 г., 13:41:19 UTC+2 пользователь TJ Murphy написал:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages