#57 Getting Started - Ruby on Rails - Architectural Overview


For beginners, learn the basic structure of a Ruby on Rails application and the request lifecycle. Learn how different components of a Rails application interact with each other.
rails development 21:50


terminalrails new testapp
# create new app with MySQL instead of SQLite
rails new testapp -d mysql 

Sequence Diagram

terminal# Generating a new controller and action
rails generate controller visitors index

# Generating a new scaffold (controller, view, and model)
rails g scaffold user first_name:string last_name
config/routes.rbRails.application.routes.draw do
  resources :users
  get 'visitors/index'
  root to: 'visitors#index'

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
adsr13 said about 2 years ago:

Rails 5 eliminates the necessity to call for 'rake db:migrate' to migrate a database. 'bin/rails or rails db:migrate is suffice. All 'rake' tasks are built into the 'rails' command. You may find this information to be valid here: 

kobaltz PRO said about 2 years ago:

You are very correct. Old habits die hard.

Login to Comment