Skip to content

Commit e4349cf

Browse files
committed
layout tweaks for mac instructions
1 parent 315b417 commit e4349cf

9 files changed

+32
-68
lines changed

app/views/install_steps/config_virtualenv.html.erb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,44 @@
44

55
<ol>
66
<li>
7-
<p>Run <code>mkdir ~/Envs</code> in the terminal</p>
7+
<p>In your terminal run the following command:
8+
<pre><code>mkdir ~/Envs</code></pre></p>
89
<p>This makes a folder in our home directory that we’ll use to store our venvs.</p>
910
</li>
1011
<li>
11-
<p><code>export WORKON_HOME=~/Envs</code></p>
12+
<p>Then run:</p>
13+
<pre><code>export WORKON_HOME=~/Envs</code></pre>
1214
<p>This says that we have set our virtualenvs to live in our home directory in a folder called Envs.</p>
1315
</li>
1416
<li>
1517
<p>Next we’ll tell our computer where to find python3 (which has our virtualenv software that we installed via pip3).</p>
16-
<p><code>export VIRTUALENVWRAPPER_PYTHON=$(command \which python3)</code></p>
18+
<pre><code>export VIRTUALENVWRAPPER_PYTHON="$(command \which python3)"</code></pre>
1719
</li>
1820
<li>
1921
<p>Then we can run the last command telling our computer how to set up virtualenv.</p>
20-
<p><code>source /usr/local/bin/virtualenvwrapper.sh</code></p>
22+
<pre><code>source /usr/local/bin/virtualenvwrapper.sh</code></pre>
2123
<p>If successful the output should look like this</p>
2224
<%= image_tag "mac_steps/config_virtualenv_terminal.png", class: "img-responsive" %>
2325
</li>
2426
<li>
2527
<p>Now we can go ahead and make this permanent.</p>
26-
<p>Run, <code>touch ~/.bash_profile</code>.</p>
27-
<p>Then, <code>open ~/.bash_profile</code>.</p>
28+
<p>Run:</p>
29+
<pre><code>touch ~/.bash_profile</code>.</pre>
30+
<p>Then:</p>
31+
<pre> <code>open ~/.bash_profile</code>.</pre>
2832
<p>This should open a text editor for you to paste the following into that file. NOTICE NO QUOTES ON THE VIRTUALENV LINE.</p>
2933
<p>
30-
<pre>export WORKON_HOME=~/Envs
34+
<pre><code>export WORKON_HOME=~/Envs
3135
export VIRTUALENVWRAPPER_PYTHON=$(command \which python3)
32-
source /usr/local/bin/virtualenvwrapper.sh</pre>
36+
source /usr/local/bin/virtualenvwrapper.sh</code></pre>
3337
</p>
3438
<p>Save the file and close the editor. To make sure it worked, we will need to close terminal.app as well and re-open it.</p>
3539
</li>
3640
<li>
3741
<p>To test our work, run:</p>
38-
<p><code>echo $VIRTUALENVWRAPPER_PYTHON</code></p>
42+
<pre><code>echo $VIRTUALENVWRAPPER_PYTHON</code></pre>
3943
<p>This will read from the variable we set, if you see</p>
40-
<p><samp>usr/local/bin/python3</samp></p>
44+
<pre><code>usr/local/bin/python3</code></pre>
4145
<p>You are set!</p>
4246
</li>
4347
</ol>

app/views/install_steps/getting_git.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<ol>
44
<li>
55
<p>In your terminal type</p>
6-
<p><code>brew install git</code></p>
6+
<pre><code>brew install git</code></pre>
77
</li>
88
<li>
99
<p>To verify your installation, in your terminal type</p>
10-
<p><code>git --version</code></p>
10+
<pre><code>git --version</code></pre>
1111
<p>Approximate expected result</p>
12-
<p><code>git version 2.x.x</code></p>
12+
<pre><code>git version 2.x.x</code></pre>
1313
</li>
1414
</ol>
1515
</section>

app/views/install_steps/install_python.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<ol>
44
<li>
55
<p>Next we get python 3 using brew. Type the following into your terminal</p>
6-
<p><code>brew install python3</code></p>
6+
<pre><code>brew install python3</code></pre>
77
<p>When that’s finished, you should see a screen like this</p>
88
<%= image_tag 'mac_steps/python_terminal_install.png', class: "img-responsive" %>
99
<p>Notice the <samp>==> Summary line</samp>, that shows we are done and it worked!</p>
1010
</li>
1111
<li>
1212
<p>Let’s test python3 now by checking the version. In your terminal run the following to check the version</p>
13-
<p><code>Python3 --version</code></p>
13+
<pre><code>Python3 --version</code></pre>
1414
<p>It should return</p>
15-
<p><samp>Python 3.x.x</samp></p>
15+
<pre><code>Python 3.x.x</code></pre>
1616
<p>If you get that, we’ve confirmed Python 3 is installed and able to be used by your user! Woo!</p>
1717
</li>
1818
</ol>

app/views/install_steps/test_virtualenv.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<ol>
44
<li>
55
<p>Lets make a virtualenv. To do this we can now use the commands that we just finished enabling.</p>
6-
<p><code>mkvirtualenv test-venv</code></p>
6+
<pre><code>mkvirtualenv test-venv</code></pre>
77
<%= image_tag "mac_steps/testing_virtualenv_terminal.png", class: "img-responsive" %>
88
</li>
99
<li>
1010
<p>Take a look at your prompt after you run the command. It shows you that you are in the virtualenv <samp>(test-venv)</samp>.</p>
1111
<p>If we close the terminal and reopen, your prompt no longer shows you are in the test-venv. To get back into it, you’ll need to use the workon command</p>
12-
<p><code>workon test-venv</code></p>
12+
<pre><code>workon test-venv</code></pre>
1313
<p>THIS IS IMPORTANT. You will forget at some point to run that command, and it will cause errors like “package not found” or “can’t load x” because you aren’t in the right environment. :)</p>
1414
</li>
1515
</ol>

app/views/install_steps/using_pip.html.erb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<section class="instructions">
22
<h1>Using Pip</h1>
3-
<p>Earlier, we installed Homebrew, which is a system-level package manager that lets us install software that our Mac uses. Pip is a programming-language-level package manager that lets us install python code that we can use in our projects. We are going to use Pip now to install two very helpful libraries, virtualenv and virtualenv-wrapper which makes working with virtualenv easier.</p>
4-
<p>A word on Virtualenv. This piece of software allows us to make isolated environments so that we don’t run into version conflicts while programming. Each one is completely separate and allows you to code knowing that you have a safe place to work.</p>
3+
<p>Earlier, we installed Homebrew, which is a system-level package manager that lets us install software that our Mac uses. Pip is a programming-language-level package manager that lets us install python code that we can use in our projects. </p>
4+
<p>We are going to use Pip now to install two very helpful libraries, virtualenv and virtualenv-wrapper which makes working with virtualenv easier.</p>
5+
<h2>A quick word on Virtualenv.</h2><p> This piece of software allows us to make isolated environments so that we don’t run into version conflicts while programming. Each one is completely separate and allows you to code knowing that you have a safe place to work.</p>
56

67
<ol>
78
<li>
89
<p>To install virtualenv we can run</p>
9-
<p><code>pip3 install virtualenv</code></p>
10+
<pre><code>pip3 install virtualenv</code></pre>
1011
<p>The output should look like this</p>
1112
<%= image_tag "mac_steps/virtualenv_terminal_install.png", class: "img-responsive" %>
1213
</li>
1314
<li>
1415
<p>Then we can grab virtualenv-wrapper</p>
15-
<p><code>pip3 install virtualenvwrapper</code></p>
16+
<pre><code>pip3 install virtualenvwrapper</code></pre>
1617
<p>This is what the output should look like</p>
1718
<%= image_tag "mac_steps/virtualenvwrapper_terminal_install.png", class: "img-responsive" %>
1819
<p>Great! Now we have all python tools we need to finish out our python environment. Let’s set up the last pieces, which may prove a little challenging. Don’t get discouraged!</p>

app/views/install_steps/verify_python.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
<ol>
44
<li>
55
<p>Let’s verify where Python is installed by running the following command</p>
6-
<p><code>which python 3</code></p>
6+
<pre><code>which python3</code></pre>
77
<p>If the output says <samp>/usr/local/bin</samp>, we are set!</p>
88
<p>If the output says <samp>/Library/Frameworks</samp> we have to make some changes.</p>
99
</li>
1010
<li>
1111
<p>You’ll need to open your bash profile by running the following</p>
12-
<p><code>open ~/.bash_profile</code></p>
12+
<pre><code>open ~/.bash_profile</code></pre>
1313
<p>Then you’ll need to remove the two lines that start with</p>
1414
<p><samp>PATH=”/Library/Frameworks/</samp></p>
1515
<p><samp>export PATH</samp></p>
1616
<p>Save the file. We’ll check our work by opening terminal and typing,</p>
17-
<p><code>which python</code></p>
17+
<pre><code>which python</code></pre>
1818
<p>If we see,</p>
1919
<p><samp>/usr/local/bin</samp></p>
2020
<p>We were successful!</p>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<section class="prompt center">
22
<%= link_to "Previous Step", previous_wizard_path, class: "option" %>
3-
<%= button_tag "Troubleshooting", type: "button", class: "troubleshooting", data: {toggle: "collapse", target: "#trouble"} %>
43
<%= link_to "Next Step", next_wizard_path, class: "option"%>
54
</section>

app/views/main/congratulations.html.erb

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,10 @@
99
<h2>What’s next?</h2>
1010
<ol>
1111
<li>
12-
<strong><%= link_to "One Month Python", "https://onemonth.com/courses/one-month-python?utm_source=installpython", target: "_blank" %></strong> helps you build your first app in less than one month!
13-
</li>
14-
<li><strong><%= link_to "Enroll now", "https://onemonth.com/courses/one-month-python?utm_source=installpython", target: "_blank" %></strong> and get started learning Rails.
12+
<strong><%= link_to "One Month Python", "https://onemonth.com/courses/one-month-python?utm_source=installpython", target: "_blank" %></strong> helps you learn the basics of python in less than one month!
1513
</li>
1614
</ol>
1715

18-
<strong><h3>Other Resources We Love for Learning Ruby and Rails:</h3></strong>
19-
20-
<div class="row">
21-
<div class="col-sm-6">
22-
<ul>
23-
<li>
24-
<a href="https://gorails.com/?utm_source=installpython" target="_blank">GoRails (Weekly Rails Screencasts)</a>
25-
</li>
26-
<li>
27-
<a href="https://www.railstutorial.org/book" target="_blank">Ruby on Rails Tutorial by Michael Hartl</a>
28-
</li>
29-
<li>
30-
<a href="http://railscasts.com/" target="_blank">RailsCasts by Ryan Bates</a>
31-
</li>
32-
<li>
33-
<a href="http://guides.rubyonrails.org/" target="_blank">Ruby on Rails Guides</a>
34-
</li>
35-
</ul>
36-
</div>
37-
38-
39-
<div class="col-sm-6">
40-
<ul>
41-
<li>
42-
<a href="http://generalassemb.ly/" target="_blank">General Assembly (12 week offline)</a>
43-
</li>
44-
<li>
45-
<a href="http://codecademy.com" target="_blank">Codecademy</a>
46-
</li>
47-
<li>
48-
<a href="http://codeschool.com" target="_blank">Codeschool</a>
49-
</li>
50-
<li>
51-
<a href="http://teamtreehouse.com/" target="_blank">Treehouse</a>
52-
</li>
53-
</ul>
54-
</div>
55-
</div><!-- .row -->
5616
</section>
5717

5818
<a href="https://github.com/onemonth/install_rails"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github-camo.global.ssl.fastly.net/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>

app/views/main/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="col-lg-12">
77

88
<div class="header-description">
9-
<h1>Install Python:<br><span style="font-size: 45px;"> <!-- A step-by-step guide --> Coming Soon</span></h1>
9+
<h1>Install Python:<br><span style="font-size: 45px;">A step-by-step guide</span></h1>
1010
<%= link_to "Start now", install_steps_path, class: "header-btn" %>
1111
</div><!-- /header-description -->
1212

0 commit comments

Comments
 (0)