Introduction
Ruby is a general purpose object oriented programming language developed by Yukihiro Matsumoto.
Key Features
- More commonly used in Rails applications.
- Concise and simple to read and powerful too.
- Open-source
- Easily scalable
- Expressive features and visual appearance
- Flexible language
- True object-oriented programming language
- Easily connected to multiple databases like DB2, MySQL, Oracle, and Sybase.
- Provides rich set of built-in functions
- Easy to learn
- Developer friendly language
Installation
Installation on Windows
- Download the software from Ruby Downloads
- Run the executable file to install Ruby
- Follow the installation steps by providing path etc and finish installation.
Installation on Linux
- Install ruby using the below command:
$ yum install ruby
- Issue the below command to check the installation is fine.
$ruby -v
Using Onecompiler
- You don't need to install any software or compiler.
- Just goto OneCompiler and choose the programming language as
Ruby
and enjoy programming without any installation.
Sample program
puts "Hello, World!"
- puts : Used to print the given text to the console.
#
: Single line Comment=begin
Multi
line
comment
=end