Ruby On Rails Step by Step

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Ruy on Rails: Step by Step from Udemy 1.

Make a folder: Rails new blog

2. Run Server: Rails server

3. Open a new Command Prompt with Ruby and Rails: a. Cd blog b. Rails generate controller home index What is Git? Git is an open source version control system created by Linux Used for all kinds of web application development and several languages

Git was initially created for Rails but has branched to other languages Git was created for speed and Git comes with RailsInstaller

Benefits of Git Speed- Almost everything is done locally which makes Git very fast as there is no network latency or overhead Distributed- It does not do a checkout of the current source code like other VCS but clones the entire repository Data Assurance Every file has a checksum for data retrieval so data corruption is almost impossible Staging- Most VCSs have a local area and remote area. Git offers a 3rd staging area in the middle. Collaboration-Extremely useful to have more than 1 developer on 1 project. Each can have their own versions.

Different that other VCS Each Respository is local Branches are easy and fast Git lets you add content, not files You never try to integrate remote changes into another state

Git Syntax There are several Git-based services and platforms but the syntax of Git is global

$ git clone deve.whatever.org:/git/fgdb.rb: If a new developer is coming in to an existing app $ git init: If you have a local folder where you want to make a repository.

$ git add .: puts everything into the staging area (INDEX) $ git commit am my first commit: Once you are done with whatever you were working on, this will puts you in (LOCAL REPOSITORY) a: wont delete a file $ git push master :Master is a branch. From LOCAL REPOSITORY to REMOTE REPOSITORY $ git checkout branchname What is Heroku? Heroku is a cloud platform as a service (PaaS) that supports several programming languages Its a new way of building apps using GIT It allows developers to focus on pure code as oppose to managing servers, deployment, etc Heroku can be scary at first.

How do we implement Heroku? 4. Sign up for the free (dev) account Download the Heroku tool belt which includes Git and a Bash command tool Setup a database Create a Git repository Push and deploy the app via Heroku Download: Postgresql a. Connect to your server

b. c. Remember your name, owner. 5. Download Heroku & Git Bash

6. Go to my file and do the following:

a. b. Go to config and then change information as highlighted. c. Go to Gemfile and then do the following:

7. Open Git Bash and type the following from C:/sites/blog: a. Gem install pg b. Bundle install c. Rails s

8. Open another Git Bash and type the following from c:/sites/blog: a. Gem install heroku b. Bundle install c. Git init d. Git add . e. Git commit m initial commit f. Heroku login

g.

You might also like