Introduction to Ruby

What is Ruby?

Ruby is a pure object oriented, general purpose,interpreted and server side scripting and programming language. It was created in 1993 by Yukihiro Matsumoto of Japan. Ruby was built for making programmer's work easy. Ruby has a lot of built-in function which are common in mostly all projects.

Why Ruby?

As I have told earlier that ruby has a number of features:

  1. Easy syntax
  2. Full object oriented
  3. Faster than PHP and Pthon ( slower than C, C++ and Java).
  4. Ruby on rails is most leading framework for web development.

If you are new with programming then don't worried about features discussed below. We will read them in these tutorials:

  1. Every function returns something.
  2. Classes are never closed and you can reopen them.
  3. Gems of ruby provide make it more featured.

Ruby is more than this but at this basic stage we can not discus them.


  1. Ruby installed
  2. One IDE installed

Install ruby:

On windows, installing softwares is easy. Install Ruby Installer and feel cool.

Linux and mac have already ruby installed. Use ruby -v command to check version. If you found that there is no ruby installed or want to install latest version of ruby then use these commands. Note I have ruby 2.2.2 installed. You may have new version. For latest version just check Ruby Site.

On Linux:

  1. sudo apt-get update
  2. sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
  3. cd
  4. git clone git:// .rbenv
  5. echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  6. echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  7. exec $SHELL
  8. git clone git:// ~/.rbenv/plugins/ruby-build
  9. echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
  10. exec $SHELL
  11. git clone ~/.rbenv/plugins/rbenv-gem-rehash
  12. rbenv install 2.2.2
  13. rbenv global 2.2.2
  14. ruby -v

On mac:

  1. ruby -e "$(curl -fsSL"
  2. brew install rbenv ruby-build
  3. # Add rbenv to bash so that it loads every time you open a terminal
  4. echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
  5. source ~/.bash_profile
  6. # Install Ruby
  7. rbenv install 2.2.2
  8. rbenv global 2.2.2
  9. ruby -v

Install IDE:

For all systems, I recommend Aptana Studio. It is free and featured.

Click on banner below to Learn: PHP with Laravel for beginners - Become a Master in Laravel

About Harish Kumar

Harish, a technical core team member at with five year experience in full stack web and mobile development, spends most of his time on coding, reading, analysing and curiously following businesses environments. He is a non-graduate alumni from IIT Roorkee, Computer Science and frequently writes on both technical and business topics.

Related Articles

PHP stands for PHP: Hypertext Preprocessor. PHP is known as a server side scripting and interpreter language for web ...
Introduction to PHP
In this tutorial, we will study about conditional statements (if else statements and switch statements). These statem...
Conditional statements in php
In this tutorial, we will study about strings and operations upon strings. Due to long length of this section, I have...
Strings in PHP (part-1)

Full-Stack Web Development with React

Best Udemy Courses

Top Posts

Recent Posts

The Complete Web Developer Course - Build 25 Websites


Subscribe now and get weekly updates directly in your inbox!

Any Course on Udemy in $6 (INR 455)

Development Category (English)300x250