- Installing cucumber in windows/pc is hard – mostly fails with so many errors 😦
- It works sometimes and sometimes not 😦
- Community and support is poor 😦
- Not easily explained anywhere 😦
So here YOU go:
- Visit Ruby Installer page and under left side Download Ruby 2.2.3(x32) or Ruby 2.2.3(x64). It depends on your PC wether it’s 32bit or 64 bit – download as accordingly.
- Install the downloaded rubyinstaller-2.2.3.exe file to c:/ drive (default location). And keep selecting (all), when options come to screen and move on next and complete the installation
- Now search for “Start command prompt with Ruby” and run this console.
- Once again, Visit Ruby Installer page and under the “DEVELOPMENT KIT“, download DevKit-tdm-32…exe or DevKit-tdm-(x64)…exe. It depends on your PC wether it’s 32 bit or 64 bit – download as accordingly.
- Now unzip the DevKit-tdm-(x64)…exe file. And you will have a file named dk.rb.
- From “Start command prompt with Ruby”, locate the dk.rb or drag-drop this file to the console.
- Once it will one on console, it will be like this
c:\Users\users\ruby developmentkit\ruby dk.rb init (hit enter)
- Again drag-drop the file to console, it will be like this
c:\Users\users\ruby developmentkit\ruby dk.rb install (hit enter)
Now we need to install few gem libary,
- gem install bundler #required
- gem install cucumber
- Download your cucumber projects and give this command “bundle install”.
- Ruby Installer and Development Kit preferred to install x64 or 32bit – depends on your PC. They have two version always there.
- To get color PASS/FAIL in windows console- Install Ansicon. Unzip the file, you will find x64/x32 – choose right one and ansicon (double click) or ansicon -i from console to install.
It doesn’t work in 64bit at all.
- Nokogiri is an HTML, XML, SAX, and Reader parser. It always messing up with windows setup. So, you need to setup manually.
- Download nokogiri desired version (mentioned in console or project requirement)
- Run this, gem install –local nokogiri-184.108.40.206-x86-mingw32.gem (just locate your file to console and hit enter)
- Certification https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem