Setup on Mac OSX
Tools you need:
- Mac with sudo Access
- Xcode with command line tools installed. The command line tools can be installed from Xcode -> Preferences -> Downloads
- RVM (optional)
- Ruby 2.1.1
- Watir-Webdriver
- webdriver-user-agent
- cucumber
- homebrew (optional)
- chromedriver
Installation:
- Install XCode from the app store
- To install RVM (Ruby Version Manager), in terminal type:
\curl -sSL https://get.rvm.io | bash -s stable
The rvm function will be automatically configured for every user on the system if you install as single user. When installation is completed you should receive similar message:
Now you may turn off you terminal, and turn it on again. After that to check if you installed it type:
rvm version
- Installing Ruby installation, type:
rvm install ruby-2.1.1
If you have more than one ruby version installed then you may want to make this version default:
rvm use ruby-2.1.1 –default
- Installing Homebrew, type:
ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
and then:
brew doctor
You may also take a look at http://brew.sh/
- Installing ChromeDriver, type:
brew install chromedriver
When installation is completed you will have following message:
If later on you want to update your version of chromedriver you may type:
brew update && brew upgrade
- Install the bundler gem, type:
gem install bundler –no-ri –no-rdoc
Bundler will provide you with consistent environment for Ruby projects. It will tracks and install the exact gems and versions that are needed.
- Install gems, type:
bundle install
Navigate to your project folder and then type bundle install. This will install all necessary gems that you need.
If your installation in some case was not complete and gave you message “freetds is missing.”, then you do not have gem tiny_tds installed. To solve that, type:
brew install freetds
and then again type:
bundle install
To see all installed gems, type:
bundle list
This is all you need for getting started.