This is a comprehensive course on Ruby on Rails. We will learn by building a small app and adding features on top of it.

:pray: Welcome to Ruby on Rails

This course has been designed to get the basic understanding of Ruby on Rails web framework. After completing this course you should be able to understand and build dynamic web applications in Ruby on Rails.

The course has been divided into different sections with a section goal.

It is highly recommended to use Linux or macOS for the Ruby on Rails development as the experience of working in Windows OS is sometime painful.

Ruby on Rails Introduction

Ruby on Rails is a server-side web application development framework written in the Ruby programming language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks.

It is a model–view–controller (MVC) framework and provides default structures for a database, a web service, and web pages. It encourages and facilitates the use of web standards such as JSON or XML for data transfer and HTML, CSS and JavaScript for user interfacing.

  • It is created by David Heinemeier Hansson (DHH) and released around July 2004.
  • It emphasizes Convention over Configuration (CoC), and the Don’t Repeat Yourself (DRY) principle.
    • Convention over Configuration means a developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default.
    • Don’t repeat yourself means that information is located in a single, unambiguous place. For example, using the ActiveRecord module of Rails, the developer does not need to specify database column names in class definitions. Instead, Ruby on Rails can retrieve this information from the database based on the class name.

Read Wikipedia page on Ruby on Rails for more on it’s history, initial releases and others.

Points to remember

  • Code snippets can be copied by selecting the code inside the gray area.
  • The code examples has been tried in specific OS/Ruby version (macOS/Ubuntu 18.04 and Ruby 2.7.1). In most of the cases, you will have the same output.
  • Check the Learning Notations section below to see important notations used.
  • The course can be properly viewable in mobile and tablet.
Use Desktop for the best learning experience as you can practice the code snippet along with.

Learning Notations

Info: Indicates some information.
Warning: Indicates warning.
Recommended: Indicates recommendation.
Important: Indicates important point or phrase.
Caution: Indicates caution.

Sections