If you’re a programmer, you’ve likely heard of Ruby or its cousin Rails. Ruby is an object-oriented programming language. Ruby on Rails is a framework of Ruby. Here, I’ll outline some major characteristics of the two and summarize why I think you should learn both and in which order.
I want to iterate that while there are some differences, without Ruby there would be no Rails.
Ruby is an interpreted scripting language that is fast and one of the easier languages to learn. You don’t have to declare or type variables, the syntax is consistent, and it offers immediate feedback during development. As I stated earlier, its object-oriented meaning that everything is an object. Not to mention, it’s also open-source and free to use.
Ruby on Rails:
As I stated earlier, Rails is a framework of Ruby. Rails is based on MVC, or Model View Controller. This is a cycle in which the model represents the structure of data in an application, the view represents a collection of classes that also represent the elements of the UI, and a controller represents the classes connecting and being used to communicate between the model and the view.
Learn both — trust me…
The key difference that I’ve found between Ruby and Rails is that Rails requires a lot less code and has integrated testing, making it better in my opinion. That does NOT mean that you should skip Ruby outright and go straight to Rails. In fact, I would recommend learning Ruby first and really nailing it before moving on to its cooler and smarter cousin Rails, so to speak.