{"id":463,"date":"2017-09-10T01:38:11","date_gmt":"2017-09-10T01:38:11","guid":{"rendered":"http:\/\/alexanderramsey.com\/blog\/?p=463"},"modified":"2017-09-10T15:22:27","modified_gmt":"2017-09-10T15:22:27","slug":"linux-shell-history-output-ch-01-of-ruby-on-rails-tutorial","status":"publish","type":"post","link":"http:\/\/alexanderramsey.com\/blog\/?p=463","title":{"rendered":"Linux Shell history Output, Ch. 01 of Ruby on Rails Tutorial"},"content":{"rendered":"<p><a href=\"http:\/\/alexanderramsey.com\/blog\/wp-content\/uploads\/2017\/09\/rails.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/alexanderramsey.com\/blog\/wp-content\/uploads\/2017\/09\/rails-253x300.jpg\" alt=\"\" width=\"253\" height=\"300\" class=\"aligncenter size-medium wp-image-482\" srcset=\"http:\/\/alexanderramsey.com\/blog\/wp-content\/uploads\/2017\/09\/rails-253x300.jpg 253w, http:\/\/alexanderramsey.com\/blog\/wp-content\/uploads\/2017\/09\/rails.jpg 300w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/a><br \/>\nThe following is output after running <code>history<\/code> command in a C9 Console (<a href=\"http:\/\/c9.io\" target=\"_blank\">c9.io<\/a>) where I am attempting my first Ruby on Rails application (Tutorial: <a href=\"https:\/\/www.railstutorial.org\/\" target=\"_blank\">railstutorial.org<\/a>) 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 <a href=\"http:\/\/www.heroku.com\" target=\"_blank\">Heroku<\/a> to deploy prod.<\/p>\n<p>Project Console History Output (console 1)<br \/>\nGet Ruby Version<br \/>\n<code>    1  ruby -v<\/code><br \/>\nSetup Git\/Bitbucket<br \/>\n<code>    2  git config --global user.name \"your name\"<br \/>\n    3  git config --global user.email email@gmail.com<\/code><br \/>\nQuick aside: Server Daemon Console history output (console 2)<br \/>\nInstall rails<br \/>\n<code>    1  gem install rails -v 5.1.2<\/code><br \/>\nMake rails app on c9<br \/>\n<code>    2  rails _5.1.2_ new hello_app<\/code><br \/>\nGoto app dir<br \/>\n<code>    4  cd hello_app\/<\/code><br \/>\nQuickly read README<br \/>\n<code>    6  cat README.md<\/code><br \/>\nQuickly read Rakefile<br \/>\n<code>    8  cat Rakefile<br \/>\n    9  ls<\/code><br \/>\nTroubleshoot bundle (dependency mgmt)<br \/>\n<code>   10  bundle install<br \/>\n   11  bundle update listen<\/code><br \/>\nUpdate bundle of Gems after modifying Gemfile due to version differences<code><br \/>\n   12  bundle update<br \/>\n   13  bundle install<\/code><br \/>\nSpin up local rails server without params<br \/>\n<code>   14  rails server<\/code><br \/>\nSpin up rails server with params<br \/>\n<code>   15  rails server -b $IP -p $PORT<\/code><br \/>\nCreate a new Git repo<br \/>\n<code>    7  git init<\/code><br \/>\nAdd files to Git repo using gitignore<br \/>\n<code>    8  git add -A<\/code><br \/>\nCheck status of working tree in Git<br \/>\n<code>    9  git status<\/code><br \/>\nMake a commit to repo with added files<br \/>\n<code>   10  git commit -m \"Init repo\"<\/code><br \/>\nTake a look at SSH for BitBucket setup<br \/>\n<code>   11  cat ~\/.ssh\/id_rsa.pub<\/code><br \/>\nReturning to Project Console (console 1) History Output<br \/>\nAdd SSH key for use with BitBucket<br \/>\n<code>   16  git remote add origin ssh:\/\/git@bitbucket.org\/username\/project<\/code><br \/>\nPush to origin current repo, failed because of bad syntax<br \/>\n<code>   17  git push -u origin all<\/code><br \/>\nCheck status of repo<br \/>\n<code>   18  git status<\/code><br \/>\nCheck log of repo<br \/>\n<code>   19  git log<\/code><br \/>\nCreate a master branch to troubleshoot failed push<br \/>\n<code>   20  git checkout -b master<\/code><br \/>\nRealized my username was wrong for use with BitBucket<br \/>\n<code>   21  git config --global user.name \"username\"<\/code><br \/>\nPushed again, correct syntax this time<br \/>\n<code>   25  git push -u origin --all<\/code><br \/>\nCheckout to newly created modify branch for Readme work<br \/>\n<code>   26  git checkout -b modify-README<\/code><br \/>\nSee branches for heck of it<br \/>\n<code>   27  git branch<\/code><br \/>\nCommit changes to repo<br \/>\n<code>   29  git commit -a -m \"Update readme\"<\/code><br \/>\nGo back to Master branch<br \/>\n<code>   30  git checkout master<\/code><br \/>\nMerge branches<br \/>\n<code>   31  git merge modify-README<\/code><br \/>\nRemove modify branch<br \/>\n<code>   32  git branch -d modify-README <\/code><br \/>\nPush changes<br \/>\n<code>   33  git push<\/code><br \/>\nCheck status again<br \/>\n<code>   34  git status<\/code><br \/>\nModify Gemfile to include <code>:development<\/code> and <code>:production<\/code><br \/>\n<code>   35  bundle install<br \/>\n   38  bundle install --without production<br \/>\n   39  git commit -a -m \"Update Gemfile for Heroku\"<\/code><br \/>\nCheck Heroku version for deployment to production<br \/>\n<code>   40  heroku version<\/code><br \/>\nSetup Heroku<br \/>\n<code>   41  heroku login<br \/>\n   42  heroku keys:add<\/code><br \/>\nCreate Heroku Virtual App Instance<br \/>\n<code>   44  heroku create<br \/>\n   45  git push heroku master<br \/>\n   46  git commit -a -m \"Update Gemfile for Heroku\"<\/code><br \/>\nCheck on Heroku Virtual App Instance<br \/>\n<code>   49  heroku help<br \/>\n   50  heroku status<br \/>\n   51  heroku sessions<br \/>\n   52  heroku webhooks<\/code><br \/>\nSee progress of issued commands in the Console Window<br \/>\n<code>   53  history<\/code><\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,32],"tags":[40,39,41],"class_list":["post-463","post","type-post","status-publish","format-standard","hentry","category-development","category-rabbit-holes","tag-rails","tag-ruby-on-rails","tag-tutorial"],"_links":{"self":[{"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=463"}],"version-history":[{"count":19,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/463\/revisions"}],"predecessor-version":[{"id":483,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/463\/revisions\/483"}],"wp:attachment":[{"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/alexanderramsey.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}