Problems:
- 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:
Firstly:
- 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.
Secondly:
- 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)
Thirdly:
Now we need to install few gem libary,
- gem install bundler #required
- gem install cucumber
Forth:
- Download your cucumber projects and give this command “bundle install”.
Note:
- 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-1.6.6.2-x86-mingw32.gem (just locate your file to console and hit enter)
Ref:
- https://stackoverflow.com/questions/16523607/cant-get-ruby-devkit-configuration-file-autogenerated-properly
- https://corlewsolutions.com/articles/article-22-install-ruby-devkit-on-windows-7
- Certification https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem