Development Environment

Requirements

You should install the following software on a Unix operating system. If you are developing on Windows, consider using a virtual machine or Linux containers.

Support

Consult the Development Environment category of Workarea support forum for help and advice on building a development environment. Developers are encouraged to post their questions as well as their tips to help others.

Build Environment

Start by ensuring you have a C compiler and other necessary software build tools.

On macOS, installing Xcode or Xcode Command Line Tools is sufficient.

Users of other systems can use tools installed by default or install additional tools provided by a package manager. For example, the following command line installs the necessary tools on Ubuntu Server LTS:

$ sudo apt-get -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

Git

Next, if Git is not already installed, use the resources below to install Git and configure basic information such as your name, email, and editor.

Additionally, to access code repositories in WebLinc's Atlassian Stash repositories, you'll need to create an SSH key pair (if none exist) and associate your public key with your Stash account. If this applies to you, refer to the following resources:

Java & Elasticsearch

In order to use Elasticsearch, you must first install Java. Download and run the appropriate Java 8 JDK installer for your system or install from a package. While you can use open source Java implementations, Elastic recommends using Oracle Java.

With Java installed, you can now install Elasticsearch. Workarea 3 is designed for Elasticsearch version 5.x. When choosing a version, try to match your production environment as closely as possible.

macOS users can install Elasticsearch via Homebrew. Users of other systems should consult the Elasticsearch documentation for the recommended installation method for your OS.

An elasticsearch process must be running on your machine before you create or boot a Workarea application. Running Elasticsearch as a service avoids the need to start and stop the server manually, at the expense of slightly reduced visibility into the server.

MongoDB

Install MongoDB via Homebrew or other package manager, or consult the MongoDB documentation for your OS. Install the version that most closely matches your production environment. As of this writing, the latest release is version 3.6, which does not have a Ruby driver compatible with Workarea. Therefore, use version 3.4 for new applications.

A mongod process must be running on your machine before you create or boot a Workarea application. Running MongoDB as a service avoids the need to start and stop the server manually, at the expense of slightly reduced visibility into the server.

Redis

Install Redis via Homebrew or other package manager, or consult the Redis documentation. Install the version that most closely matches your production environment. New Workarea applications typically use the latest stable version.

A redis-server process must be running on your machine before you create or boot a Workarea application. Running Redis as a service avoids the need to start and stop the server manually, at the expense of slightly reduced visibility into the server.

Image Magick

Install ImageMagick via Homebrew or other pacakge manager. After installing, confirm the convert executable is available in your shell.

PhantomJS

Install PhantomJS via Homebrew or other package manager. Confirm the phantomjs executable is available in your shell. Use version 2.x.

JavaScript Runtime

If not already installed, you must install a JavaScript runtime that's supported by ExecJS. See the ExecJS readme for supported runtimes. If you aren't sure which runtime to choose, Node.js is a good default.

Ruby

You should install a Ruby version manager to allow the installation and management of multiple Ruby versions within your development environment. Most developers at WebLinc use rbenv, making it a good choice.

Then install at least one version of Ruby. Since Workarea 3.2.9, the platform requires a version of Ruby greater than 2.4.1 and less than 2.5.0. Install the version you are using in Production, which is most likely the latest stable version.

RubyGems

RubyGems is installed with Ruby, but you should upgrade to the latest version. Also, to make gem search, gem dependency, and other useful commands aware of a WebLinc gems server, you must add the server as an additional source, including your credentials.

$ gem update --system
$ gem sources --add https://USER:PASSWORD@gems.weblinc.com

Bundler

Install Bundler and configure it with your gems server secrets as well.

$ gem install bundler
$ bundle config gems.weblinc.com USER:PASSWORD

Bundler will notify you when new versions are available. Stay on the latest version to avoid issues with bundle resolution.

Application Development

Bundler will take care of installing the remaining Ruby dependencies for your application, so you're ready to create a new application or work with an existing application.