views:

271

answers:

5

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 to together? Is the syntax the same?

+4  A: 

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

Brian Rasmussen
+19  A: 

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.

+2  A: 

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. :)

280Z28
I'd argue that RoR is a framework, not a library. See http://en.wikipedia.org/wiki/Software_framework for more.
@lutz: And I'd argue that you are probably right. Wait, that's not much of an argument. :o
280Z28
A: 

Ruby is a scripting language and Rails is the framework which is built using Ruby . Ruby and Rails are tightly coupled . "Rails is magic emerged out of Ruby " . What ever you write in Rails application is just a Ruby code . When you run a rails application , you are just interpreting the ruby code using ruby interpreter . Conclusion its all about Ruby !!!

YetAnotherCoder
Not really "coupled". Rails is totally dependent on Ruby but it's pretty much a one-way thing. OK, cool ideas in Rails may find their way into standard libraries over time and Rails may be a driver for increased development activity on Ruby (note Engine Yard's involvement), but Rails is not necessary to Ruby's continuing existence.
Mike Woodhouse
A: 

Rails monkeypatches standard libraries of ruby, so it's almost like a dialect of ruby rather than merely a framework.

Andrew Grimm