Install Cucumber on Windows

1. Install Ruby 2.1
Download and install Ruby. For Windows, http://rubyinstaller.org/ is the best option. Install the latest release of stable version – for me this was 2.1. Make sure you check the option to “Add Ruby executables to your PATH.”
2. Install Ruby Development Kit
Open a command prompt.
cd C:\
mkdir RDK
cd RDK
cd to C:\RDK\rubyinstaller-master
rake ruby21 # builds MRI 2.1.
  1. test with ruby -v and gem -v
  2. install Cukes with “gem install cucumber”
  3. install Capybara with “gem install capybara”
  4. install selenium-webdriver with  “gem install selenium-webdriver”
  5. http://qastuffs.blogspot.co.nz/2011/02/how-to-install-ansicon-for-cucumber-to.html follow this to install colours in the windows command prompt

Create a project folder with something like “TestCukes”  eg.

  1. mkdir projects\test-cukes
  2. cd  projects\test-cukes
  3. cucumber

I got this error cannot load such file — nokogiri/nokogiri (LoadError)

I had to:

  1. uninstall nokogiri gem
  2. gem uninstall nokogiri
  3. Download nokogiri
  4. Install gem locally (※below path may differ according to your downloaded nokogiri-1.6.6.2-x64-mingw32.gem path)
  5. gem install –local C:\Users\$user$\Downloads\nokogiri-1.6.6.2-x64-mingw32.gem