SlideShare a Scribd company logo
www.edureka.co/ruby-on-rails
View Ruby On Rails course details at www.edureka.co/ruby-on-rails
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email us : webinars@edureka.co
Building Application With Ruby On Rails Framework
Slide 2Slide 2Slide 2 www.edureka.co/ruby-on-rails
 Introduction to Ruby on Rails Framework
 Features of Ruby on Rails
 MVC Architecture
 Building Rails Application
What will you learn today?
Slide 3Slide 3Slide 3 www.edureka.co/ruby-on-rails
9 Reasons Why You Should Learn Ruby
It is easy to learn Saves time by writing more with less Create web apps quickly and with ease
It is free of charge Ruby can be customized
Slide 4Slide 4Slide 4 www.edureka.co/ruby-on-rails
9 Reasons Why You Should Learn Ruby (Contd.)
It is Portable Learning Ruby helps you get a job
Make your own Domain Specific Language
The community will help
www.rubyonrails.org/community
DSL
Slide 5Slide 5Slide 5 www.edureka.co/ruby-on-rails
Ruby on Rails
 Ruby on Rails is a full-stack framework
» Used to developing web applications
» It is working under the Model-View-Control pattern
» It is an open source framework
 Ruby on Rails framework is familiar for
» Simplicity
» Productivity
» Speed of development
» Reliable Solutions
 Ruby is an Object Oriented Programming language
 Ruby has simple English like syntax
 Using Ruby you will write less code
Slide 6Slide 6Slide 6 www.edureka.co/ruby-on-rails
Examples of Application built on Ruby on Rails
Slide 7Slide 7Slide 7 www.edureka.co/ruby-on-rails
Rails Golden Rule 1 : DRY
 DRY just means "Don't Repeat Yourself". Make sure that when you write code, you only write it one time.
 The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative
representation within a system."
Reference: https://maurits.wordpress.com
Slide 8Slide 8Slide 8 www.edureka.co/ruby-on-rails
Rails Golden Rule 2 : Convention Over Configuration
 Convention over configuration (also known as coding by convention) is a software design paradigm which seeks
to :
 For example, if there is a class Sale in the model, the corresponding table in the database is called "sales" by default.
It is only if one deviates from this convention, such as calling the table "product sales", that one needs to write code
regarding these names.
Not losing
flexibility
Decrease
number of
decisions on
developers
Gain
Simplicity
Slide 9Slide 9Slide 9 www.edureka.co/ruby-on-rails
Rails MVC Architecture
Slide 10Slide 10Slide 10 www.edureka.co/ruby-on-rails
 Rails application can be created using the following command
>rails new app_name
 When you create an application using the rails helper script, you can see that a new directly structure is
created for your application. The directory structure will have to following directories that will be explained in
the next slide.
Creating a Rails Application
Slide 11Slide 11Slide 11 www.edureka.co/ruby-on-rails
Directory Layout
File /Folder Purpose
app/
Contains the controllers, models, views, helpers, mailers and assets for your
application.
bin/
Contains the rails script that starts your app and can contain other scripts you use to
deploy or run your application.
config/ Configure your application's routes, database, and more
condig.ru Rack configuration for Rack based servers used to start the application.
db/ Contains your current database schema, as well as the database migrations
Gemfile
Gemfile.lock
These files allow you to specify what gem dependencies are needed for your Rails
application. These files are used by the Bundler gem.
Lib/ Extended modules for you application
Log/ Application log files
Slide 12Slide 12Slide 12 www.edureka.co/ruby-on-rails
Directory Layout (Contd.)
File /Folder Purpose
public/ The only folder seen by the world as-is. Contains static files and compiled assets.
Rakefile
This file locates and loads tasks that can be run from the command line. Rather than
changing Rakefile, you should add your own tasks by adding files to the lib/tasks
directory of your application
README.rdoc
This is a brief instruction manual for your application. You should edit this file to tell
others what your application does, how to set it up, and so on.
test/ Unit tests, fixtures, and other test apparatus.
tmp/ Temporary files (like cache, pid, and session files).
Vendor/
A place for all third-party code. In a typical Rails application this includes vendor’s
gems.
Slide 13Slide 13Slide 13 www.edureka.co/ruby-on-rails
 Rails application can be booted using the
following command
>rails server
 This command will fire up WEBrick, a web
server distributed with Ruby.
» Default environment is development
» Default port is 3000
» http://127.0.0.1:3000
Running Rails Application
Slide 14Slide 14Slide 14 www.edureka.co/ruby-on-rails
To see your application in action, open a browser window and navigate to http://localhost:3000
Running Rails Application (Contd.)
Slide 15Slide 15Slide 15 www.edureka.co/ruby-on-rails
Creating Rails Views and Controller
 Create first controller
>rails generate controller home
 Create new file and store with name index.html.erb
>rails g controller home index
 Add the content to index.html.erb file
<h1>Hello, Rails!</h1>
 Open the file config/routes.rb in your editor. Remove
the comment “#” and change root to
# root ‘home#index'
Slide 16Slide 16Slide 16 www.edureka.co/ruby-on-rails
Creating Rails Views and Controller (Contd.)
Launch the web server again and navigate to http://localhost:3000 in your browser.
Slide 17 www.edureka.co/angular-jsSlide 17Slide 17Slide 17
Certifications
Get certified in Ruby On Rails by Edureka
Edureka's Ruby On Rails course:
• It covers all the fundamental concepts of OOPS and Web Applications, Ruby scripting, MVC architecture to advanced topics like
Gemified plugins, Application deployments, API conventions, cloud support by Heroku, Front End, and Back End DB
collaborations etc.
• It will enable learners to build web applications using the powerful Rails framework and the highly dynamic, object-oriented
Ruby language. Participants will also get to implement one project towards the end of the course.
• Online Live Courses: 30 hours
• Assignments: 25 hours
• Project: 20 hours
• Lifetime Access + 24 X 7 Support
Go to www.edureka.co/ruby-on-rails
Batch starts from 24th October (Weekend)
Thank You
Questions/Queries/Feedback
Recording and presentation will be made available to you within 24 hours

More Related Content

PDF
Ruby On Rails
DOC
Asp.Net Tutorials
PDF
WDI-Poject-4-README
PPTX
Dev streams2
PPTX
Ruby on Rails - An overview
PPT
Ruby on Rails workshop for beginner
PPTX
Drupal 8, Symfony and Content Management
PPS
Asp.Net 2.0 Presentation
Ruby On Rails
Asp.Net Tutorials
WDI-Poject-4-README
Dev streams2
Ruby on Rails - An overview
Ruby on Rails workshop for beginner
Drupal 8, Symfony and Content Management
Asp.Net 2.0 Presentation

What's hot (20)

PDF
Chapter 1 (asp.net over view)
PDF
A Work Day Of A Web Developer
PPTX
Flex Introduction
PPTX
ASP.NET Lecture 1
PPTX
Web Development In 2018
PPTX
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
PDF
Be Happy With Ruby on Rails - Ecosystem
PPTX
Laravel Eloquent ORM
PPT
Asp.net
DOC
Tutorial asp.net
PPTX
AIR - Framework ( Cairngorm and Parsley )
PDF
Ruby On Rails Starter Kit
PPT
A Tour of Ruby On Rails
PPT
Rutgers - Active Server Pages
PDF
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
PPTX
New Features of ASP.NET 4.0
PPT
Quick Start: ActiveScaffold
PDF
Laravel presentation
PDF
Wso2 product release webinar introducing jaggery
PPTX
How to Install and Configure Drupal CMS
Chapter 1 (asp.net over view)
A Work Day Of A Web Developer
Flex Introduction
ASP.NET Lecture 1
Web Development In 2018
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Be Happy With Ruby on Rails - Ecosystem
Laravel Eloquent ORM
Asp.net
Tutorial asp.net
AIR - Framework ( Cairngorm and Parsley )
Ruby On Rails Starter Kit
A Tour of Ruby On Rails
Rutgers - Active Server Pages
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
New Features of ASP.NET 4.0
Quick Start: ActiveScaffold
Laravel presentation
Wso2 product release webinar introducing jaggery
How to Install and Configure Drupal CMS
Ad

Viewers also liked (12)

PDF
Contenido examen final
PDF
W mach02 (1)
ODP
Geometria i
DOCX
10 vietnamese foods you need to try
PPTX
Feide med sterk autentisering 13102015
PDF
Sai wire manufacturing
PPTX
ashutosh
PDF
Last PP - Inês
PDF
AccessBank Investor presentation Q3 2014
PPT
Representation of Ethnicity in Hotel Babylon
PDF
Contenido 2do. parcial 2016
PDF
BOOK - IBM Sterling B2B Integration and Managed File Transfer Solutions
Contenido examen final
W mach02 (1)
Geometria i
10 vietnamese foods you need to try
Feide med sterk autentisering 13102015
Sai wire manufacturing
ashutosh
Last PP - Inês
AccessBank Investor presentation Q3 2014
Representation of Ethnicity in Hotel Babylon
Contenido 2do. parcial 2016
BOOK - IBM Sterling B2B Integration and Managed File Transfer Solutions
Ad

Similar to Building Application with Ruby On Rails Framework (20)

PDF
Building Application With Ruby On Rails Framework
PDF
Principles of MVC for Rails Developers
PDF
Aspose pdf
PDF
Ruby Rails Web Development
PPT
Rails
 
PPT
Ruby on Rails introduction
DOCX
Rails Concept
PDF
Ruby on Rails Scaffold_ Create Your App In Minutes
PPT
Viridians on Rails
PDF
Docker For Ruby On Rails : Meaning, Benefits, & Use Cases
PDF
Ruby Rails Web Development.pdf
PDF
rails.html
PDF
rails.html
PPTX
RoR guide_p1
PPT
Ruby On Rails Tutorial
ODP
Ruby On Rails - Rochester K Linux User Group
ODP
Instruments ruby on rails
PDF
Ruby On Rails Basics
PDF
Introduction to Ruby on Rails
PDF
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
Building Application With Ruby On Rails Framework
Principles of MVC for Rails Developers
Aspose pdf
Ruby Rails Web Development
Rails
 
Ruby on Rails introduction
Rails Concept
Ruby on Rails Scaffold_ Create Your App In Minutes
Viridians on Rails
Docker For Ruby On Rails : Meaning, Benefits, & Use Cases
Ruby Rails Web Development.pdf
rails.html
rails.html
RoR guide_p1
Ruby On Rails Tutorial
Ruby On Rails - Rochester K Linux User Group
Instruments ruby on rails
Ruby On Rails Basics
Introduction to Ruby on Rails
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPT
Teaching material agriculture food technology
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
KodekX | Application Modernization Development
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25 Week I
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Teaching material agriculture food technology
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
KodekX | Application Modernization Development
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced Soft Computing BINUS July 2025.pdf
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25 Week I

Building Application with Ruby On Rails Framework

  • 1. www.edureka.co/ruby-on-rails View Ruby On Rails course details at www.edureka.co/ruby-on-rails For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email us : [email protected] Building Application With Ruby On Rails Framework
  • 2. Slide 2Slide 2Slide 2 www.edureka.co/ruby-on-rails  Introduction to Ruby on Rails Framework  Features of Ruby on Rails  MVC Architecture  Building Rails Application What will you learn today?
  • 3. Slide 3Slide 3Slide 3 www.edureka.co/ruby-on-rails 9 Reasons Why You Should Learn Ruby It is easy to learn Saves time by writing more with less Create web apps quickly and with ease It is free of charge Ruby can be customized
  • 4. Slide 4Slide 4Slide 4 www.edureka.co/ruby-on-rails 9 Reasons Why You Should Learn Ruby (Contd.) It is Portable Learning Ruby helps you get a job Make your own Domain Specific Language The community will help www.rubyonrails.org/community DSL
  • 5. Slide 5Slide 5Slide 5 www.edureka.co/ruby-on-rails Ruby on Rails  Ruby on Rails is a full-stack framework » Used to developing web applications » It is working under the Model-View-Control pattern » It is an open source framework  Ruby on Rails framework is familiar for » Simplicity » Productivity » Speed of development » Reliable Solutions  Ruby is an Object Oriented Programming language  Ruby has simple English like syntax  Using Ruby you will write less code
  • 6. Slide 6Slide 6Slide 6 www.edureka.co/ruby-on-rails Examples of Application built on Ruby on Rails
  • 7. Slide 7Slide 7Slide 7 www.edureka.co/ruby-on-rails Rails Golden Rule 1 : DRY  DRY just means "Don't Repeat Yourself". Make sure that when you write code, you only write it one time.  The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." Reference: https://maurits.wordpress.com
  • 8. Slide 8Slide 8Slide 8 www.edureka.co/ruby-on-rails Rails Golden Rule 2 : Convention Over Configuration  Convention over configuration (also known as coding by convention) is a software design paradigm which seeks to :  For example, if there is a class Sale in the model, the corresponding table in the database is called "sales" by default. It is only if one deviates from this convention, such as calling the table "product sales", that one needs to write code regarding these names. Not losing flexibility Decrease number of decisions on developers Gain Simplicity
  • 9. Slide 9Slide 9Slide 9 www.edureka.co/ruby-on-rails Rails MVC Architecture
  • 10. Slide 10Slide 10Slide 10 www.edureka.co/ruby-on-rails  Rails application can be created using the following command >rails new app_name  When you create an application using the rails helper script, you can see that a new directly structure is created for your application. The directory structure will have to following directories that will be explained in the next slide. Creating a Rails Application
  • 11. Slide 11Slide 11Slide 11 www.edureka.co/ruby-on-rails Directory Layout File /Folder Purpose app/ Contains the controllers, models, views, helpers, mailers and assets for your application. bin/ Contains the rails script that starts your app and can contain other scripts you use to deploy or run your application. config/ Configure your application's routes, database, and more condig.ru Rack configuration for Rack based servers used to start the application. db/ Contains your current database schema, as well as the database migrations Gemfile Gemfile.lock These files allow you to specify what gem dependencies are needed for your Rails application. These files are used by the Bundler gem. Lib/ Extended modules for you application Log/ Application log files
  • 12. Slide 12Slide 12Slide 12 www.edureka.co/ruby-on-rails Directory Layout (Contd.) File /Folder Purpose public/ The only folder seen by the world as-is. Contains static files and compiled assets. Rakefile This file locates and loads tasks that can be run from the command line. Rather than changing Rakefile, you should add your own tasks by adding files to the lib/tasks directory of your application README.rdoc This is a brief instruction manual for your application. You should edit this file to tell others what your application does, how to set it up, and so on. test/ Unit tests, fixtures, and other test apparatus. tmp/ Temporary files (like cache, pid, and session files). Vendor/ A place for all third-party code. In a typical Rails application this includes vendor’s gems.
  • 13. Slide 13Slide 13Slide 13 www.edureka.co/ruby-on-rails  Rails application can be booted using the following command >rails server  This command will fire up WEBrick, a web server distributed with Ruby. » Default environment is development » Default port is 3000 » http://127.0.0.1:3000 Running Rails Application
  • 14. Slide 14Slide 14Slide 14 www.edureka.co/ruby-on-rails To see your application in action, open a browser window and navigate to http://localhost:3000 Running Rails Application (Contd.)
  • 15. Slide 15Slide 15Slide 15 www.edureka.co/ruby-on-rails Creating Rails Views and Controller  Create first controller >rails generate controller home  Create new file and store with name index.html.erb >rails g controller home index  Add the content to index.html.erb file <h1>Hello, Rails!</h1>  Open the file config/routes.rb in your editor. Remove the comment “#” and change root to # root ‘home#index'
  • 16. Slide 16Slide 16Slide 16 www.edureka.co/ruby-on-rails Creating Rails Views and Controller (Contd.) Launch the web server again and navigate to http://localhost:3000 in your browser.
  • 17. Slide 17 www.edureka.co/angular-jsSlide 17Slide 17Slide 17 Certifications Get certified in Ruby On Rails by Edureka Edureka's Ruby On Rails course: • It covers all the fundamental concepts of OOPS and Web Applications, Ruby scripting, MVC architecture to advanced topics like Gemified plugins, Application deployments, API conventions, cloud support by Heroku, Front End, and Back End DB collaborations etc. • It will enable learners to build web applications using the powerful Rails framework and the highly dynamic, object-oriented Ruby language. Participants will also get to implement one project towards the end of the course. • Online Live Courses: 30 hours • Assignments: 25 hours • Project: 20 hours • Lifetime Access + 24 X 7 Support Go to www.edureka.co/ruby-on-rails Batch starts from 24th October (Weekend)
  • 18. Thank You Questions/Queries/Feedback Recording and presentation will be made available to you within 24 hours