You are currently viewing Ubuntu Rails VM Tutorial Introduction

Ubuntu Rails VM Tutorial Introduction

Part 1 of 5 of the Ubuntu Rails VM Tutorial series

This guide will walk you through setting up a virtual machine on your Windows 10 PC.  This will be a Ruby on Rails VM running Ubuntu and provisioned with Ansible through Vagrant.

This provisioning builds a VM with the following:

  • Ubuntu 16.04.6 (Xenial, 64bit)
  • Apt, Bash, openssl, git, curl
  • Sqlite3, postgreSQL
  • Rvm, ruby 2.6.4, nodejs, yarn, rails 6.0.0

Requirements for the Rails VM

This guide assumes you have a GitHub account, a Windows PC powerful enough to host a virtual machine, access to the Internet, and some basic working knowledge of tech, operating systems, and of the components involved in web development.

In Part 2 of this series we will discuss what to install to provision and launch your Rails VM.

PC Specs

Is your PC powerful enough to host a virtual machine?  

It depends, not only on your virtual machine specs, but, more importantly, the performance you expect out of your virtual machine.  For this guide, a more-than-adequate system would have at least 16GB of memory and a 500GB hard drive, as well as a processor with multiple cores no older than four years. 

If your system is not quite up to those specs, feel free to give it a shot anyway, adjusting the Vagrant configuration file for more or less memory and CPU cores. 

Know or Want to Learn

You should have a passing familiarity or the ability to learn as you go the following:

  • Unix command line, specifically Bash
  • Ansible structure, language, best practices
  • Visual Studio Code: workspace, configuration, general usage
  • Error handling
  • Debugging and analysis

Beyond This Tutorial

Other associated topics not covered in this tutorial:

  • Creating your own project
  • Checking your code project in and out of Github
  • Preserving or backing up a VM
  • Making your own changes to the provisioning of the vm
  • Tweaking and debugging tips

Shifting Sands: A Note about Versions

Be aware some software pieces are updated manually by you, like the version of Vagrant installed, but many versions involved will update to the latest available, both on the host and on the guest virtual machine.

While many of the automatic updates can be turned off or versions fixed, those tweaks are beyond the scope of this tutorial.

A Note about Best Practices

When researching how to setup the Rails VM, I based my provisioning on a wide variety of examples, some older than others.  This means some yaml files have hybrid formatting (using a mix of equal signs and colons in different tasks).  Over time, I hope to clean up the provisioning files for better conformance to best practices.

References

CR Johnson

As a software engineer with over a decade of experience working for Fortune 50 companies developing software for Windows, the web, and a few interplanetary spacecraft, she's programmed in a plethora of languages including the C#/ASP.NET stack and, recently, Rails. She has tweaked more CSS files than she can count and geeks out a little on data and SQL databases. In her spare time she works on her first novel and enjoys bicycling and dark chocolate.

This Post Has One Comment

Comments are closed.