Ruby is one of open source and dynamic programming language and also a focus on simplicity and productivity. You can natural to read and easy to write programming and very elegant syntax.

The following steps to install RUBY on your Linux system,

Install Ruby on Debian or Ubuntu :

Debian GNU/Linux and Ubuntu install ruby pakcage using apt package manager. Run the below command to install in system.

$ sudo apt-get install ruby-full

Install on CentOS, Fedora, RHEL:

Same as, install ruby package on CentOS, Fedora, Redhat use the yum command. Run the following command.
$ sudo yum install ruby

The installed version is typically the latest version of Ruby available

Another way manually can install ruby pacakge 

Download and Install : 

Download  the Ruby package from the 
# wget

Extract tar file
# tar -zxvf ruby-2.2.3.tar.gz

Now, configure, make and make install
# cd ruby-2.2.3

# ./configure

# make

# install

installing bundle gems:       /usr/local/lib/ruby/gems/2.2.0 (build_info, cache, doc, extensions, gems, specifications)
installing rdoc:              /usr/local/share/ri/2.2.0/system
installing capi-docs:         /usr/local/share/doc/ruby

To check the ruby version,
# ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]

To check the ruby installed location,
# whereis ruby
ruby: /usr/local/bin/ruby /usr/local/lib/ruby