![]() First off lets get ruby installed and configured for use I've recently switched from ruby 1.9.3 to 2.3 and haven't had too much pain, so lets start with that. Download and run the latest ruby installer from rubyinstaller.org/downloads/, for this example I will be using 2.3.0. Install ruby (as an administrator) in their default folder C:\Ruby230 and don’t forget to check ‘Add Ruby executables to your PATH’. Open up a console (cmd.exe) and type ruby -v and you should get ruby 2.3.0 Install DevKit Once again download the correct DevKit from rubyinstaller.org/downloads/, for this example I'm using DevKit-mingw64-32-4.7.2-20130224-1151-sfx. Extract it to C:\DevKit. Add C:\DevKit to your system path. You will need to re-open the console after setting any system path variables. At the command prompt type cd C:\DevKit ruby dk.rb init ruby dk.rb install Configure and update gems I usually don’t want ri and rdoc for gems so I disabled it by default. Create a file named .gemrc in your home directory with the following content gem: --no-ri --no-rdoc gem update --system Now to update the gems. At the command prompt type gem update --system Install bundler Bundler is great for taking care of dependencies and taking away the need to install and maintain a bunch of gems. At the command prompt type gem install bundler Install Ansicon Ansicon gives you color output in the windows console. This helps a lot with cucumber, and gives some nice options for use when you are writing output to the console. I like to have a number of tools available at all times in the console, so I usually setup a directory called C:\path to put tools like this in. Make sure to add C:\path to your path (see the instructions above. Grab the latest version of ansicon and extract ansicon.exe, ANSI32.dll, and ANSI64.dll to the C:\path folder. Set Ansicon as your console There are two ways to setup ansicon, I prefer to use it directly without changing my regular cmd console, so I simply pin a link to the ansicon.exe in my taskbar. I usually change the icon to something nicer as well. Configure Ansicon In the shortcut options (In windows 10 right click on the icon in the taskbar, then right click on ANSI Console) I set the following in the properties tabs
| Side note: I use windows for GUI automation. The toolset available on windows and the fact that a lot of new QA users use windows makes this an easy choice. Some of the setup/config will work on Mac/Linux, YMMV. Also, this guide assumes that you are an administrator user on your system. Quick links: Home directory on windows To find your home directory, type the following at the command prompt or in a windows explorer address bar %HOMEPATH% |
I've been helping to setup automation for a number of individuals and teams and have decided to publish all of the setups and configs that I've been using. I'll break this down into a couple of parts to focus on each of the steps along the way. If I get ambitious I may even automate the setup...
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorHi, my name is Clancey and I am a quality advocate, agile coach, scrum master, automator, and toolsmith. Getting started with ruby automation series
Archives
June 2023
Categories
All
|