Set up Ruby environment on windows

Environment


Install Ruby

You can install Ruby from Ruby Installer for Windows.

Due to fail reading nokogiri when you execute rspec, you need to install Ruby 2.1.x.

f:id:hrt0kmt:20150831184649p:plain


Install DevKit

You install DevKit from same site.

I installed DevKit-mingw64-32-4.7.2-2D13D224-1151.sfx.exe and put C:¥. After execute DevKit.exe file, you make devkit directory and throw PATH to C:¥devkit¥bin.


C:¥devkit>ruby dk.rb init
[INFO] found RubyInstaller v2.1.6 at C:/Ruby21

Initialization complete! Please review and modify the auto-generated 'config.yml' file to ensure it contains the root directories to all of the installed Rubies you want enhanced by the DevKit.

C:¥devkit>
C:¥> gem install rspec
C:¥> gem install selenium-webdriver
C:¥> gem install capybara
C:¥> gem install pry

You can install which one.

And put where you thrown PATH.