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.
Full instructions are available here:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
- test with ruby -v and gem -v
- install Cukes with “gem install cucumber”
- install Capybara with “gem install capybara”
- install selenium-webdriver with “gem install selenium-webdriver”
- 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.
- mkdir projects\test-cukes
- cd projects\test-cukes
- cucumber
I got this error cannot load such file — nokogiri/nokogiri (LoadError)
I had to:
- uninstall nokogiri gem
- gem uninstall nokogiri
- Download nokogiri
- Install gem locally (※below path may differ according to your downloaded nokogiri-1.6.6.2-x64-mingw32.gem path)
- gem install –local C:\Users\$user$\Downloads\nokogiri-1.6.6.2-x64-mingw32.gem