From bbd86842bdd2790ed871d2a0804c322ffd791e2d Mon Sep 17 00:00:00 2001 From: Thomas Joseph Lawton III Date: Wed, 15 Aug 2018 14:04:15 -0400 Subject: [PATCH] Add linux documentation (#314) [ci skip] * Updates README.md with details on setup for Linux * Fixes silly git mistake * Adds Linux setup documentation to README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index bdd665c22..0c3ec52c0 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,17 @@ These prerequisites assume you are running macOS. If you are running a different * Yarn: use `brew install yarn` to install yarn. It will also install node if you don't already have it. * PostgreSQL: the easiest way to get started with this is to use [Postgres.app](https://postgresapp.com/). +### Linux pre-requisites (based on Ubuntu 18.04) +These prerequisites assume you're working on a Linux-based operating system but have been written by an Ubuntu 18.04 user so they may not work on all distributions. + +* Ruby: As recommended, [rbenv](https://github.com/rbenv/rbenv) should be used to install the Ruby version listed on the badge. Very detailed directions for rbenv installation for several distros can be found [here](https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04). +* Bundler: `gem install bundler` +* Foreman: `gem install foreman` +* Yarn: There are two ways to install Yarn. + 1. Found [here](https://yarnpkg.com/en/docs/install#debian-stable) + 2. [This](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04) post describes how to install [NVM](https://github.com/creationix/nvm) a Node version manager. By installing NVM you can select a Node version (I would suggest either LTS or current), the guide will also explain how to install NPM. This way you'll have Node, NPM, and then you can run `npm install -g yarn` to install Yarn. +* PostgreSQL: For Ubuntu run `sudo apt update && sudo apt install postgresql postgresql-contrib libpq-dev`. To test the installation you can run `sudo -u postgres psql` which should open a PostgreSQL prompt. Exit the prompt by running `\q` then run `sudo -u postgres createuser -s $YOUR_USERNAME` where $YOUR_USERNAME is the username you are currently logged in as. Lastly, at least on Debian based systems, in the codebase under /config/database.yml you'll want to comment out the `host: localhost` to configure the database to use Unix domain sockets as outlined [here](https://stackoverflow.com/questions/23375740/pgconnectionbad-fe-sendauth-no-password-supplied). + ### Installation 1. `git clone git@github.com:thepracticaldev/dev.to.git` 2. `bundle install`