What is the difference between Ruby and Ruby on Rails?

Viewed 63134

I have been studying Ruby for the past few days and I have noticed there is Ruby on Rails.

What is the difference between the two? Do they work together? Is the syntax the same?

6 Answers

Ruby is a programming language. Ruby on Rails ("RoR") is a web-application framework that is implemented in Ruby.

So they not only "work together" but RoR depends on Ruby.

Ruby is a general purpose language. Ruby on Rails is a Ruby framework for implementing web applications.

Ruby is a scripting language and Rails is a framework which is built using Ruby.

Ruby and Rails are tightly coupled and "Rails is magic emerged out of Ruby". Whatever you write in a Rails application is just Ruby code. When you run a Rails application, you are just interpreting the Ruby code using Ruby's interpreter.

Ruby on Rails is a library written in the Ruby language. Its popularity prompted many people to take up writing in Ruby to make use of it, which led many people to treat them as inseparable. :)

Related