Setting Up the Development Environment

In this demonstration, I will show how to set up the development environment used throughout the demos. We will use a Unix-like environment, regardless of the operating system being run. As a consequence, some of the setup will be different based on your computer’s operating system (OS):

In the text below, we use badges similar to the ones above to denote which instructions apply to which OS. Following this initial setup demo, OS-specific instructions will be much fewer are farther between.

1. Unix-Like Environment and Terminal App

As mentioned above, the demos will use a Unix-like development environment, although the exact environment will vary by OS. The main interface for such environments are terminal applications, which will similarly vary by OS.

2. Package Manager

Modern full-stack development platforms have numerous library and tool dependencies. To manage these dependencies, we will use a package management system, which will vary by OS.

3. Chrome

Google Chrome will be the web browser of choice for the demos. Although the demo web app should be compatible with any modern web browser, Chrome has certain development features that we will use and that are not necessarily common to all browsers.

4. VS Code

Visual Studio Code (VS Code) will be the code editor of choice for the demos. It should look and work essentially the same on all OSs; however, the installation instructions vary somewhat by OS. (Note that VS Code is not the same thing as the Microsoft Visual Studio IDE.)

4.1. VS Code Installation

4.2. VS Code Extensions

5. Z Shell

Z Shell is the Unix shell of choice for the demos. It has a number of productivity features not found in other shells. We will use the Oh My Zsh Z Shell configuration manager, which provides a plugin and theme infrastructure for Z Shell. In addition to the features Oh My Zsh provides by default, we will also add a custom theme.

5.1. Install Z Shell

5.2. Make Z Shell the Default

5.3. Install Oh My Zsh

5.4. Add Custom Theme

6. pgAdmin 4

pgAdmin 4 is a database viewer and administration tool for PostgreSQL databases. This application will allow us to inspect our backend databases from a web browser.

7. Git

Git is a version-control system that we will use to manage different versions of the demo project as it evolves.

7.1. Git Installation

7.2. Git Configuration

8. GitHub

GitHub is a web-based Git repository hosting service. We will use it (in conjunction with Git) to distribute different versions of the demo project as it evolves.

8.1. GitHub Account Registration

Since GitHub is a web-based service, we will need to register an account via GitHub’s web interface.

8.2. Key-Based Authentication

Since GitHub will require us to authenticate every time we upload changes to our project, and we upload changes frequently, entering our password every time can be a hassle. SSH key authentication enables Git to automatically authenticate us using secure cryptographic keys in lieu of our password.

9. Node.js and Yarn

Modern web frontend code makes heavy use of JavaScript (JS), and as a consequence, there are numerous commonly used JS libraries and packages. Node.js and Yarn provide tools for managing JS packages

10. RVM

Ruby Version Manager (RVM) is a tool for managing different versions of the Ruby Programming Language and different Ruby gemsets. A gemset is the collection of Ruby gems (i.e., Ruby libraries and toolkits) used by a Ruby-based software project. We will use RVM to carefully control the version of Ruby and the associated Ruby gems that the demo project uses.

10.1. RVM Dependencies

10.2. RVM Installation

11. Ruby on Rails

Ruby on Rails (aka Rails) is a popular web-development framework and toolkit. It will provide the main platform upon which we construct the demo app.

11.1. Ruby

As the name suggests, Rails is built using the Ruby Programming Language. Thus, Rails requires a Ruby interpreter to be installed.

11.2. Bundler Gem

Bundler is a Ruby gem management tool (which is itself a gem) that Rails projects use to manage their gem dependencies.

11.3. Rails Gem

Rails is packaged as a gem that must be installed in order to create, run, etc. Rails projects.

12. Postgres

Postgres is a popular database management system. The demo Rails project will use Postgres as its database backend.

13. Conclusion

Having completed all of the above development environment setup, the next step will be to test that it’s all working by running an existing Rails-based web app.