Difference between revisions of "Installing ruby with cucumber on a windows machine"
Line 53: | Line 53: | ||
<li><code>gem install win32console --no-ri --no-rdoc</code></li> | <li><code>gem install win32console --no-ri --no-rdoc</code></li> | ||
<span class="comment">Win32console supports colored output when running scripts in command line</span> | <span class="comment">Win32console supports colored output when running scripts in command line</span> | ||
− | <li><code>gem install | + | <li><code>gem install lapis_lazuli --no-ri --no-rdoc</code></li> |
<li><code>gem install cucumber --no-ri --no-rdoc</code></li> | <li><code>gem install cucumber --no-ri --no-rdoc</code></li> | ||
</ol> | </ol> | ||
Line 68: | Line 68: | ||
actually saying: "Hey Ruby! I want you to look at this file dk.rb I have here and install it".</p> | actually saying: "Hey Ruby! I want you to look at this file dk.rb I have here and install it".</p> | ||
− | <p>Same thing happens with "gem install | + | <p>Same thing happens with "gem install lapis_lazuli": "Hey Ruby, I want you to do something with a gem, which is |
− | installing and the name is | + | installing and the name is lazpis_lazuli". After which Ruby is going to look online in their software system |
− | looking for a gem called | + | looking for a gem called lapis_lazuli.</p> |
[[Category:Installing ruby with cucumber]] | [[Category:Installing ruby with cucumber]] |
Revision as of 11:39, 27 June 2016
Contents
Installing Ruby
- Download and open rubyinstaller-2.0.0-p598.exe*
- Accept the terms
- Install to C:\Ruby **
- Check all 3 checkboxes
* Ruby version 2 is used here because this is currently the most stable version in combination with
Windows 7 and the plugins we're using.
* We're installing Ruby 32 bit because 64 bit can cause issues.
** You can install to a different folder, but in the rest of this training we will refer to this
folder.
Installing DevKit
- Download and open DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
- Extract to C:\Ruby\devkit\
- Open command promt
- Go to Run (Windows Key + R)
- Write 'cmd'
- Press enter
- Go to C:\Ruby\devkit
- Write
ruby dk.rb init
* - Write
ruby dk.rb install
**
* You should see "found rubyinstaller"
** In the screenshot a warning a given because I already had it installed.
Installing the necessary plugins
Now the installation of Ruby is complete, we can start installing the necessary plugins. These are so called “Gems” in Ruby. (A ruby is a gem, so the creators decided to call their plugins gems)
- Open the command prompt and write the following commands:
gem update --system
gem install rspec --no-ri --no-rdoc
gem install win32console --no-ri --no-rdoc
gem install lapis_lazuli --no-ri --no-rdoc
gem install cucumber --no-ri --no-rdoc
To make sure everything is up to date
Note: There is a chance that you'll get an SSL error, in that case refer to this answer
Installing rspec because it's a very common used gem
Win32console supports colored output when running scripts in command line
That's it! You're now ready to start setting up your cucumber project. You can read more about this in the next article.
Extra information
This section is for you to have a better understanding of what is happening during the installation. And what the commands we're using in console actually mean.
When we installed ruby, we checked a checkbox saying "Add ruby executables to your PATH". What we did here, was making ruby commands globally accessible in the console.
Now because these commands are global, we can go to devkit folder and write "ruby dk.rb install". Where we are actually saying: "Hey Ruby! I want you to look at this file dk.rb I have here and install it".
Same thing happens with "gem install lapis_lazuli": "Hey Ruby, I want you to do something with a gem, which is installing and the name is lazpis_lazuli". After which Ruby is going to look online in their software system looking for a gem called lapis_lazuli.