Ruby is a dynamic, reflective, object-oriented, general-purpose programming language with syntax influenced by Perl and Smalltalk.
It was created 20 years ago and today is among top 10 programming languages by popularity. Like Java or the C language, Ruby is a general-purpose programming language, though it is best known for its use in web programming.
Rails is a software library that extends the Ruby programming language. David Heinemeier Hansson is its creator. He gave it the name “Ruby on Rails,” though it is often just called "Rails."
It is software code that is added to the Ruby programming language. Technically, it is a package library (specifically, a RubyGem), that is installed using the operating system command-line interface.
Ruby’s key advantage is RubyGems, the package manager that makes it easy to create and share software libraries (gems) that extend Ruby. RubyGems provides a simple system to install gems. Anyone can upload a gem to the central RubyGems website, making the gem immediately available for installation by anyone. The RubyGems website is where you’ll obtain the most recent version of Rails. And it is where you will obtain all the gems that help you build complex websites.