Put simply, Ruby on Rails was built as an extension of Ruby. Ruby on Rails is not a programming language! It increases the dimension and speed of the scripting language by enabling libraries and pre-made code pieces. These things enable developers to concentrate on how an application works instead of how to make it work.
Rails also help to combine Ruby with JavaScript, HTML, and CSS.