SlideShare a Scribd company logo
Ruby on Rails
  3-Day BootCamp
Introductions


Name

Coding Experience

What would you like to learn?
Curriculum

RoR Toolset

Rails Walk-Through

Gems and Deployment

Full Apps and Ruby inside Rails
Schedule
   Times         Day 1           Day 2           Day3
9am - 10:30      Tools        RubyToolBox     BootStrap
   Break
              Scaffold and                   RailsApps and
10:45 - 12                     Cucumber
                 Views                        Hobo / Spree
   Lunch
               Routes and
1pm - 2:30                      Devise        Calculator
              Controllers
   Break

               Models and
2:45 - 4:30                  I18N and Haml    Translator
                Testing
Learning Goals


Basic Rails

Common Patterns and Practices

Where to go for help
Learning Path

Experimentation

Test First Teaching

Ask Questions

Resources for finding answers
Structure

Explanation (me talking)

Demonstration (me typing)

Experimentation (in-class coding)

Questions
RoR Tools
RVM / Pik / Jewelry Box / Rb.Env

Git / Github / Heroku

Sublime / Vi / RubyMine

RubyGems / RubyToolbox

Testing / RSpec / Cucumber

Terminal / irb / Rails Console
RoR Resources
RailsGuides - guides.rubyonrails.org

Rails API - api.rubyonrails.org

RubyDoc - ruby-doc.org

RailsCasts - railscasts.com

Github ReadMe

Ruby ToolBox - www.ruby-toolbox.com
Ruby vs. Rails
Ruby is the Language -

  developed 1993

  Yukihiro Matsumoto “Matz”



Rails is the Framework -

  developed 2004

  David Heinemeier Hansson “DHH”
The Ruby Way
Written in C

Influenced by SmallTalk & Pearl

Ruby is for People

MINSWAN

OSS (Open Source Software)

RubyGems
The Rails Way

Opinionated Software

Convention over Configuration

DRY (Don’t Repeat Yourself)

TDD (Test Driven Development)

Less Code, More Productivity
Tools
Command Line

Ruby / RubyGems

Rails

Source Control - Git

IDE

Deployment - Heroku
Command Line

Command Prompt (CLI)

Mac: Terminal, iTerm, etc...

Unix: bash, zsh, csh, etc....

Windows: Command Prompt w/ Ruby on
Rails
Ruby

Ruby -v

  1.9.2, 1.9.3, 2.0.0 (1.8.7)

gem list

  Bundler, Rake, rubygems, etc...
RVM
Ruby Version Manager
Ruby Version Manager
 rvm list

 rvm use

 rvm gemset list

             rvm.io
Ruby Versions
MRI, YARV, Standard Library, C-Ruby

JRuby - Java

Rubinius - Pure Ruby

MagLev - SmallTalk

MacRuby - Objective-C

IronRuby - C# (for .Net)
Rails



Rails -v

  2.0-3, 3.0-2, 4.0
RVM Demo
Gemset for Rails 4

  rvm use --create 2.0.0@rails4

  gem install rails   --version 4.0.0.beta1

  mkdir rvm_test

  cd rvm_test

  rvm --rvmrc --create
Git



which git

git --version
Git

Source Control System

Timeline, Track Changes

Branching and Merging

Code Safety
Git Commands
git clone / init

git status

git add / rm

git commit

git push

git log
Git Remotes



GitHub - www.github.com

Heroku - www.heroku.com
Git Help


Git Site - git-scm.com

Git Immersion - gitimmersion.com

GitHub Help - help.github.com
Git Demo
mkdir git_test

cd git_test

git init

touch test_file.txt

git status

git add .

git commit -m “add a file”

git status
Git Demo
cd ..

git clone git_test/.git
clone_test

cd clone_test

ls

git remote -v

touch clone.txt

git commit -am “add another
file”
Editor

Sublime Text 2 / TextMate

RubyMine

KomodoEdit

Eclipse

Vi / Vim / Emacs
Sublime Text 2


Command line alias
  Win: doskey subl="C:Program FilesSublime Text 2sublime_text.exe" $*


  Mac: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl


  Linux: sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl



How to Open a folder
BREAK!



10-15 minutes
Rails

New Rails App

Modify the HomePage

Scaffold

MVC

Layers
Create a New App


rails

  Shows Options

rails new <app_name> --options
Create a
Class Management App
Class Management App

 We want an app to manage Students,
 Classes, and Teachers

 rails new class_mngmt
The Application
     Directory


The Root of our App: Rails root

Entire App in one directory!
Run the App

cd class_mngmt

rails

  see rails commands

rails server
Save a Baseline
     with git
     with git
git init

git add .

git commit -m “add a bare rails app
to track changes”
Modify the HomePage



public/index.html

public folder contains static content
Scaffolding


rails generate

  see the generators

rails g scaffold Student full_name
age:integer bio:text title
MVC
          Response

                         Controller

          Request
Browser

           View


                             Model



                  Database
Shorten Bio Demo



Shorten the bio on the view page

Add a read more link
Helpers

Presentation Logic

Presenter Pattern

Ruby Module - Included on all views

Method Definitions

Help generate html
View Exercise

On the main Student page

  Change the Listing Students to

  Show only the Full Name and title

  Have the Full Name link to the
  view page

  Remove the view link
Lunch!



12pm - 1pm

More Related Content

What's hot (14)

PPTX
Groovy
Tom Corcoran
 
PPTX
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
John Potocny
 
KEY
tDiary annual report 2009 - Sapporo Ruby Kaigi02
Hiroshi SHIBATA
 
PDF
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
DrupalCamp Kyiv
 
PDF
Migration from drupal 7 to drupal 8
Krzysztof (Chris) Ozog
 
PPT
The future of server side JavaScript
Oleg Podsechin
 
ODP
Ruby Debug
Rob Kaufman
 
ODP
Getting Groovy
Adam Davis
 
PDF
How to distribute Ruby to the world
Hiroshi SHIBATA
 
PDF
Groovy android
Mario García
 
PDF
How to write a well-behaved Python command line application
gjcross
 
PDF
The hacker choice
Flavio Castelli
 
PDF
The details of CI/CD environment for Ruby
Hiroshi SHIBATA
 
PDF
A Look at Command Line Swift
JoshuaKaplan22
 
Groovy
Tom Corcoran
 
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
John Potocny
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
Hiroshi SHIBATA
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
DrupalCamp Kyiv
 
Migration from drupal 7 to drupal 8
Krzysztof (Chris) Ozog
 
The future of server side JavaScript
Oleg Podsechin
 
Ruby Debug
Rob Kaufman
 
Getting Groovy
Adam Davis
 
How to distribute Ruby to the world
Hiroshi SHIBATA
 
Groovy android
Mario García
 
How to write a well-behaved Python command line application
gjcross
 
The hacker choice
Flavio Castelli
 
The details of CI/CD environment for Ruby
Hiroshi SHIBATA
 
A Look at Command Line Swift
JoshuaKaplan22
 

Viewers also liked (6)

DOCX
Soal biologi 3 far semester 2
Casini Mu'thi
 
PDF
Asset pipeline osdc
wildjcrt
 
PDF
My rails way
wildjcrt
 
PDF
Example Mobile Push Notification Service in Rails
Mo Omer
 
PDF
Boardgamegeek網站介紹
wildjcrt
 
PDF
Rails入門與新人實戰經驗分享
wildjcrt
 
Soal biologi 3 far semester 2
Casini Mu'thi
 
Asset pipeline osdc
wildjcrt
 
My rails way
wildjcrt
 
Example Mobile Push Notification Service in Rails
Mo Omer
 
Boardgamegeek網站介紹
wildjcrt
 
Rails入門與新人實戰經驗分享
wildjcrt
 
Ad

Similar to Ruby on Rails 3 Day BC (20)

PDF
PDF Ruby on Rails 3 Day BC
Northwest Independent Ruby Development
 
PPTX
Ruby On Rails Intro
Sarah Allen
 
ODP
Instruments ruby on rails
pmashchak
 
PPT
Ruby On Rails Tutorial
sunniboy
 
PPTX
Dev streams2
David Mc Donagh
 
PPT
Intro ror
tim_tang
 
PPT
Ruby On Rails
Gautam Rege
 
PPT
Introduction To Rails
Eric Gruber
 
PPTX
Why Ruby?
IT Weekend
 
KEY
Supa fast Ruby + Rails
Jean-Baptiste Feldis
 
PPTX
Ruby on Rails : First Mile
Gourab Mitra
 
KEY
Ruby on Rails Training - Module 1
Mark Menard
 
PPT
OSCon - Performance vs Scalability
Gleicon Moraes
 
PDF
Ruby on Rails Presentation
Michael MacDonald
 
PPT
Ruby on Rails introduction
Tran Hung
 
PPT
Java, Ruby & Rails
Peter Lind
 
PDF
Introduction to Rails - presented by Arman Ortega
arman o
 
PPTX
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Udaya Kiran
 
PPTX
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
PPTX
Ruby on rails for beginers
shanmukhareddy dasi
 
PDF Ruby on Rails 3 Day BC
Northwest Independent Ruby Development
 
Ruby On Rails Intro
Sarah Allen
 
Instruments ruby on rails
pmashchak
 
Ruby On Rails Tutorial
sunniboy
 
Dev streams2
David Mc Donagh
 
Intro ror
tim_tang
 
Ruby On Rails
Gautam Rege
 
Introduction To Rails
Eric Gruber
 
Why Ruby?
IT Weekend
 
Supa fast Ruby + Rails
Jean-Baptiste Feldis
 
Ruby on Rails : First Mile
Gourab Mitra
 
Ruby on Rails Training - Module 1
Mark Menard
 
OSCon - Performance vs Scalability
Gleicon Moraes
 
Ruby on Rails Presentation
Michael MacDonald
 
Ruby on Rails introduction
Tran Hung
 
Java, Ruby & Rails
Peter Lind
 
Introduction to Rails - presented by Arman Ortega
arman o
 
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Udaya Kiran
 
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
Ruby on rails for beginers
shanmukhareddy dasi
 
Ad

Recently uploaded (20)

PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
Difference between write and update in odoo 18
Celine George
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Council of Chalcedon Re-Examined
Smiling Lungs
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Difference between write and update in odoo 18
Celine George
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Council of Chalcedon Re-Examined
Smiling Lungs
 
Introduction presentation of the patentbutler tool
MIPLM
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 

Ruby on Rails 3 Day BC