#StoneProfitsSystem


Ruby - Environment Tools Setup

  • Ruby is a scripting language, It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. 
  • We need to install Ruby software from < www.ruby-lang.org > depending upon the OS environment to avail programming platform.
  • Additionally we need to get GEMS, for Ruby software environment as a plugin for the compiler.
Here, you can see the major components of a gem: 
1. The lib directory contains the code for the gem. 
2. The test or spec directory contains tests, depending on which test framework the developer uses.
3. A gem usually has a Rakefile, which the rake program uses to automate tests, generate code, and perform other tasks. 
4. This gem also includes an executable file in the bin directory, which will be loaded into the user’s PATH when the gem is installed.
After successful installation of Ruby software we can verify which version we have installed on our machine.

By using command:  ruby -v



How to Run a Ruby Program ?
  • After writing the program in notepad or any software editor, Save the file with the extension ".rb" .
  • Load the program in command prompt as shown in the below.



No comments:

Post a Comment