The following is output after running history
command in a C9 Console (c9.io) where I am attempting my first Ruby on Rails application (Tutorial: railstutorial.org) using the Cloud 9 web IDE. Impressive amount of functionality after limited configuration. Going from zero to running application in ~50 commands is a rare feat today with how complicated the web stack world can be. Even have two environments running: prod and dev by using Heroku to deploy prod.
Project Console History Output (console 1)
Get Ruby Version
1 ruby -v
Setup Git/Bitbucket
2 git config --global user.name "your name"
3 git config --global user.email email@gmail.com
Quick aside: Server Daemon Console history output (console 2)
Install rails
1 gem install rails -v 5.1.2
Make rails app on c9
2 rails _5.1.2_ new hello_app
Goto app dir
4 cd hello_app/
Quickly read README
6 cat README.md
Quickly read Rakefile
8 cat Rakefile
9 ls
Troubleshoot bundle (dependency mgmt)
10 bundle install
11 bundle update listen
Update bundle of Gems after modifying Gemfile due to version differences
12 bundle update
13 bundle install
Spin up local rails server without params
14 rails server
Spin up rails server with params
15 rails server -b $IP -p $PORT
Create a new Git repo
7 git init
Add files to Git repo using gitignore
8 git add -A
Check status of working tree in Git
9 git status
Make a commit to repo with added files
10 git commit -m "Init repo"
Take a look at SSH for BitBucket setup
11 cat ~/.ssh/id_rsa.pub
Returning to Project Console (console 1) History Output
Add SSH key for use with BitBucket
16 git remote add origin ssh://git@bitbucket.org/username/project
Push to origin current repo, failed because of bad syntax
17 git push -u origin all
Check status of repo
18 git status
Check log of repo
19 git log
Create a master branch to troubleshoot failed push
20 git checkout -b master
Realized my username was wrong for use with BitBucket
21 git config --global user.name "username"
Pushed again, correct syntax this time
25 git push -u origin --all
Checkout to newly created modify branch for Readme work
26 git checkout -b modify-README
See branches for heck of it
27 git branch
Commit changes to repo
29 git commit -a -m "Update readme"
Go back to Master branch
30 git checkout master
Merge branches
31 git merge modify-README
Remove modify branch
32 git branch -d modify-README
Push changes
33 git push
Check status again
34 git status
Modify Gemfile to include :development
and :production
35 bundle install
38 bundle install --without production
39 git commit -a -m "Update Gemfile for Heroku"
Check Heroku version for deployment to production
40 heroku version
Setup Heroku
41 heroku login
42 heroku keys:add
Create Heroku Virtual App Instance
44 heroku create
45 git push heroku master
46 git commit -a -m "Update Gemfile for Heroku"
Check on Heroku Virtual App Instance
49 heroku help
50 heroku status
51 heroku sessions
52 heroku webhooks
See progress of issued commands in the Console Window
53 history
This concludes Chapter 1 output. I will post subsequent chapters as I complete them. My goal is to revisit the process I go through to reinforce learning and identify where I made mistakes for future avoidance and for more understanding.