Professional Documents
Culture Documents
Web Development With Ruby On Rails: Unit 1: Introduction and Installation
Web Development With Ruby On Rails: Unit 1: Introduction and Installation
01_slide.html
!SLIDE
Course Objectives
Become familiar with web development Learn the features and idioms of Ruby Learn to develop web applications in Rails Learn how to engage with the Ruby community !SLIDE
Course plan
Setup Git, Heroku HTTP, HTML, CSS Ruby Rails !SLIDE
Format
13 weeks Hours: 1:30pm - 2:30pm Questions encouraged !SLIDE
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
1/8
1/11/12
01_slide.html
Homework
10 small assignments (after each class) 1 midterm review quiz 1 final project (start today) !SLIDE
Final project
A Rails app of your choosing Graded on: Completeness Use of testing Seperation of concerns Proper use routes and view helpers Deployment !SLIDE
Homework submission
Commit to Github Submit notification via CourseKit* Due by 9am Monday morning !SLIDE
Grading
10pts x 10 assignments = 100 pts 50pts midterm review 10pts x 5 final project criteria Total / 200 pts (some bonuses available) !SLIDE
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
2/8
1/11/12
01_slide.html
About Me
Mat Schaffer Mashion.net, Philly.rb, Comcast \@matschaffer http://about.me/matschaffer !SLIDE
About Dan
Dan Shipper EyeRedux, DomainPolish, WhereMyFriends.Be, ReadStream \@danshipper http://danshipper.com !SLIDE
About Patrick
Patrick Leahy Recent Stuff: Penn Rent a CTO (Dec 11), EyeRedux (Nov 11), PennFreeFood (Aug 11) \@leahy16 http://patrickleahy.me !SLIDE
Here we go!
!SLIDE
Why Rails?
!SLIDE
What is Rails?
Developed for BaseCamp by 37 signals DSL for web applications !SLIDE
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
3/8
1/11/12
01_slide.html
!SLIDE
Setup
Windows: RailsInstaller For RailsInstaller, make sure the Add to PATH box is ticked before installing. Restart after the install finishes. !SLIDE
Setup
Mac: Use http://bit.ly/cis196-mac10-7 Or Xcode: http://bit.ly/cis196-mac-xcode Ubuntu: Use http://bit.ly/cis196-ubuntu If you hit trouble, consider an Ubuntu VM !SLIDE bullets
Or RailsCasts
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html 4/8
1/11/12
01_slide.html
railscasts.com/episodes/310 !SLIDE
Rails
@@@ sh gem install rails
!SLIDE
Install Check
@@@ sh ruby --version gem --version rails --version # 1.9 or higher # 1.8 or higher # 3.1 or higher
!SLIDE
!SLIDE
Deployment
Via git (git-scm.org) to Heroku (heroku.com) !SLIDE
SSH Keys
Used by SSH and Git Two parts Private key (id_rsa), keep this on your computer Public key (id_rsa.pub), upload this to the server !SLIDE
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
5/8
1/11/12
01_slide.html
Make a key
@@@ sh Generating public/private rsa key pair. Enter file in which to save the key (/Users/mat/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:
!SLIDE
Commit it to git
@@@ git git git sh init add . commit -m "Initial commit"
!SLIDE
Push it to heroku.com
@@@ sh gem install heroku heroku create mat-expenseapp git push heroku master
!SLIDE
Whats git?
Keeps your code safe Makes sharing code easier Helps you look at code history !SLIDE
Git Basics
!SLIDE
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
6/8
1/11/12
01_slide.html
Whats heroku?
THE CLOUD Easy hosting of Rails apps Deploy via git Lots of Add-ons (extra databases, logging, search, etc) GOTCHA: Cant use the HD !SLIDE
Homework
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html 7/8
1/11/12
01_slide.html
run rails new replace public/index.html with a LOLCat* deploy it to heroku !SLIDE
Need Help?
CourseKit irc.freenode.net#philly.rb http://groups.google.com/group/phillyrb
localhost/Users/mat/docs/Work/Teaching/UPenn/RailsClass/slides/01_introduction/one/01_slide.html
8/8