-
Notifications
You must be signed in to change notification settings - Fork 0
1 Getting Started
This is the starting page for the wiki, and will deal with setup. Each page will begin with a short blurb about the goal of the page and the "target audience". This specific page will deal with the setup to allow you to download, execute and begin learning from this Project.
This page has been written at the "technical manager" level, with the assumptions that they
- "know what Github is"
- "know what code is"
The assumption is also that they do not have
- "a copy of Github Desktop"
- "an updated version of ruby"
- "know how to open their local Terminal in their MacBook and install / execute command-line software"
- "an understanding of basic Linux functions / how to navigate folders"
If the previous does not sound like you, maybe you should advance to the next page labeled "Installing the Tools"
Care will be taken to provide "plain English" documentation, but without using excessive "nerd English".
This is the link to Github Desktop.
The installation process is fairly straight forward but I will be documenting it below.
-
Click Download
-
Wait For the Download to Complete
-
Open the File
-
Click the Search Icon (the little magnifier)
-
Type Applications
-
Drag the Application to the Folder You may also drag Github Desktop to the icon bar at the bottom of your Mac's screen to keep it there for easier access.
-
Double Click to Open
-
Click 'Sign into Github.com'
-
Click 'Sign in Using your Browser'
-
Click 'Authorize Desktop'
-
Mission Accomplished.
-
Head to the project main page and click "clone or download"
-
Click 'Open in Desktop'
-
Click 'Open Github Desktop'
-
Click 'Clone'
-
Mission Accomplished
Most modern MacBooks contains a version of Ruby (normally 2.0.0). This version of ruby is ancient but we can upgrade it in order to run modern Ruby on Rails software. In this next section we will perform the following tasks
- Install a modern version of ruby
- Install Bundler
Before we do, let's have a bit of training to make the following sections easier. We will be "opening a terminal" or "opening a terminal session". Most of the management tasks a developer performs within Rails (creating new pages, doing database work) occur within a "terminal session".
- Click the Search Icon (the little magnifier)
-
Type "terminal" and press Enter
-
Mission Accomplished. You may also drag the Terminal entry in the search results to the icon bar at the bottom of your Mac's screen to keep it there for easier access.
When running commands in the terminal, you need to press "Enter" or "Return" after you type the command.
Installing a new version of ruby is easy but being able to install multiple versions for testing different projects is even better. We will be doing this with RVM (Ruby Version Manager).
-
Open a terminal session
-
Execute the command - I have dragged it below for easier access.
\curl -sSL https://get.rvm.io | bash -s stable
-
Install a version of Ruby - At the time of writing, 2.4.0 was a decent version (get coffee, this takes forever)
rvm install 2.4.0
"
Bundler is one of the most used Ruby gem managers. It is used to ensure everything you need to run a project is installed quickly and effectively.
-
Open a terminal session
-
Execute the command - I have dragged it below for easier access.
gem install bundler
There are mountains and mountains of information relating to the terminal. My main objective is to get you to be comfortable moving around, get you to the Rails folder and install all of your requirements using bundler.
By default, the terminal will place you at the "home" folder. This is your user folder and should have the same name as your username when logging into your computer.
You can see what folders are available by typing ls
which stands for "list directory contents"
You can go into a folder by typing cd
followed by the folder's name. For example, I will move into the activescratcher folder and see what's there using ls
.
Quick Tip: If you use the "Tab" key halfway through typing the folder's name, the terminal can give you suggestions or autofill the rest of a long folder name. This saves you typing and reduces the risk of RSI.
You can go back up one folder by typing cd ..
and confirm you are back by typing ls
again.
By default, newer versions of Github Desktop will download your projects in your home folder under a folder called "Github" under "Documents". Older versions of Github Desktop used to place your projects right at the home folder, just run an ls
command and check visually for the folder.
You can use the cd Documents/Github/darnbrokenrails
command to get you to the folder.
As you saw above, bundler is used to get all of the requirements for an application.
You can install the dependencies by running the terminal command bundle install
inside your project folder.
Depending on how many dependencies there are, this may take a while.