Yes, it's the most fun part of any software-intensive experience: get your tools to work! A summary of the steps below:
- Get yourself a
bash shell with root (administrator) privileges
- Ensure cURL works
- Install and configure Git CLI including
rvm and recent versions of Ruby and Rails
- Install Node.js and
- Install the Heroku CLI
For each step, we'll show you how to test interactively if it worked, and there's also a script you can run at the end that tests everything and whose output you can submit as evidence that your setup works.
Note. Work with your team on this process, so you can help each other by Googling and debugging. If you run into a wall, don't go straight to the staff. Work with your team to get as far as you can before stalling and asking for help. Remember RASP: Read the docs, Ask a teammate, Search the internet, then Post a question. Ask yourself: Has your team done enough self-help that if you were at a software company, you would go to a senior engineer for help with this problem?
A Note on Windows:
For windows we recommend starting with "Windows Subsystem for Linux 2". We are not Windows exports, but recommend these two posts:
Bash & basic command-line tools
What development environment should I use? We don’t care, as long as you have a Unix-like command shell such as bash, because believe us, you will be using it all the time. GUIs are fine, but you will need a bash shell and, probably, root (administrator) privileges for some of the installs. Some choices:
- Local (Linux): You already have it. Determine which package manager (most likely
apt) works with your system, as you'll need it later to install some packages.
- Local (Mac OS 10 or 11): The Mac terminal runs bash by default. You may want to install Homebrew for managing other packages later.
- Local (Windows): We recommend using Git for Windows, which gives you the Git CLI and a bash-like shell, along with many other useful command-line tools including
- Web-based IDE: there are many. Pick one you like. Some are free. But you need one that gives you a bash shell and root access.
echo $SHELL at the shell prompt should result in
/bin/bash or something similar.
The Swiss Army knife of command-line Web tools. On MacOS, it's preinstalled. On Linux, if it's not installed you can try
sudo apt install curl. On Windows, if you use Git for Windows you also get Curl, but otherwise you're on your own; try the cURL home page for help, but really, you should use Git for Windows.
curl --version should show you which curl version is installed.
Install the git command-line tools if they're not already installed (i.e. if typing
git does not show you a help message). Then configure GitHub ssh access.
ssh -T firstname.lastname@example.org should give you a happy message.
rvm (Ruby Version Manager), Ruby ~>2, Rails ~>6
Different Ruby projects may require different Ruby versions. Ruby Version Manager lets you not only install multiple versions and choose which one is active at any given time, but also allow each version to install its own sets of Ruby gems. Download and install it here, then install Ruby 2.6.x or 2.7.x for any x of your choosing (who knows which one you'll actually need later, this is to make sure the toolchain works). Finally, switch to the just-installed Ruby with
rvm use, then gem install rails, which should give you a version of 6.0 or later.
rvm list should show a list of installed Rubies.
rails -v should show
node and npm
The installers for Mac/Windows/Linux will install both Node and NPM, the Node Package Manager, which we'll use later.
node -v and
npm -v should display the versions installed.
If you don't have a Heroku account, create one. Install the Heroku CLI and say
heroku login to authenticate yourself to Heroku.
heroku apps should show a list of all the apps you've deployed on Heroku; the list might be empty.
You can run our script that tries to verify that everything looks OK:
curl -sSL https://raw.githubusercontent.com/saasbook/courseware/master/verify-setup.sh | bash