This guide was originally created by DevBootcamp for its students in 2015.
By the end of this lesson, you should be able to:
- Install technologies from the command line
- Understand what a package manager is and why it is helpful
You will need to have your computer set up with the following tools for CODE. Make sure to go through this guide step-by-step. You'll need to have each of these technologies installed to have a smooth start to CODE and your future career!
Here is the instructions for getting your windows environment set up. We will be installing:
- Chocolatey
- Sublime
- Ruby
- Rspec
- Node
- Git
- SQLite
- Postgresql
(i.e. directions - each release is necessary for the next release, so be sure to do everything in the order specified for all challenges)
Download and follow instructions from their site. Make sure to move it to your applications folder. You can choose to download either Sublime Text 2 or 3.
If you have done this correctly, you should be able to open files from the command prompt using subl "filename" now.
You don't have to purchase your license right away, you can "cancel" out of the dialog box as many times as you would like, but it is good practice to buy a license after you decide you like it. (Since eventually you're hoping to get paid for writing programs, you want to pay it forward in advance.)
Now lets install our package manager to get the libraries we need.
Chocolatey works like howbrew for mac or apt-get for linux. We download this program and say:
"Chocolatey, download Ruby!" or "Chocolatey, download Nodejs!"
Chocolatey takes care of downloading and installing these programs for you. It even adjusts your PATH variable to make sure the OS accesses these languages correctly.
The first step is to install chocolatey, it can be found here.
Navigate to your root directory C:/ for cmd.exe or PS:/ if you are using powershell and run one of these commands.
cmd.exe
C:/ @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\binFor the Powershell Users. Note that you do not want to run both of these, just use whichever relates to which terminal you use.
Powershell
PS:/ iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))It will give you a message to say that chocolatey has finished installing and your cursor will be under your control again. Now we can start installing packages. You can search a list of all the available for chocolatey on their website Chocolatey packages.
Now we can install our first package, Ruby. In your root directory type:
C:/ choco install rubyThis will install Ruby 2.1.5, type ruby -v, if you get an output that declares your Ruby version, you are good to go!
Rspec is a testing framework built in Ruby and is the current front runner in testing framworks. We have some test driven challenges that use rspec, so we will install it as well.
gem install rspecnow type:
rspec -vto check your install
Similar to Ruby, we just use a different command.
C:/ choco install nodejs.installRestart your command line terminal.
Type node -v to test your succcess.
You get the idea:
C:/ choco install git.installRestart your command line terminal.
Type git --version to test your install.
Now we can configure some of the git settings.
First thing is to set your username and email you have related to your GitHub account
git config --global user.name "John Doe"
git config --global user.email johndoe@example.comThen we want to set up our default git editor to sublime. Follow these instructions.
The DLL
C:/ choco install sqliteAnd the SQLite shell
C:/ choco install sqlite.shellRestart your terminal.
Type this to test:
sqlite3 -versionCreate a symlink (symbolic link) to open Sublime from your console.
-Sublime Text from the Command Line for Windows 7
Note that you will not need postgres until you work on a backend project. If you plan on making this your primary development machine, postgres is a much better option than SQLite for larger apps.
For Postgresql we will use the postgres recommended windows installation. Here is the installation page spalsh page the installation page install and the instructions instructions
The step we don't want is using stack builder, it is unncessary for our purposes.
Here is a video that is a bit old but may be helpful for the visual learners out there youtube
When finished, type:
psql -Vmake sure its a capital V, this prints the version and exits. If you get into psql command line hit CTRL + D to exit.
NOTE: If you have trouble installing postgres, don't worry about it. You won't need it until Phase 2. We wanted to have it set up in advance when your path was all sqeakly clean and wonderful, but if you have trouble, just move on.
You now have a set up environment for development! If you are interested in this kind of thing, there is a whole job created around automating server and terminal set up. It is called DevOps, they do lots of things to make software development more efficient. Check it out! devopsreactions
Add your name and photo to the CODE open-source website.