Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Added Ubuntu 18.04 installation instructions #2

Merged
merged 3 commits into from
Oct 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ friendly.
![voice](./app/assets/images/readme/voice.png)

## Installation
### On MacOS

#### Getting started with Homebrew
- Make sure [homebrew](https://brew.sh/) is installed
Expand All @@ -54,13 +55,39 @@ friendly.
- Visit http://localhost:3000
- If you have already ran the installation and want to start the server, just run `sh scripts.sh start`

#### Creating a user
### On Ubuntu 16.04+
#### Install dependencies
- Run `sudo apt install yarn` or `npm install -g yarn` to install yarn. If you run into `error Couldn't find an integrity file `, run `yarn install --check-files` and try again.
- Make sure you have postgres-dev-server installed. eg. `sudo apt install postgresql-server-dev-11` if you use Postgres 11.

#### Install Ruby
- Install `rbenv`(rbenv is the 'nvm' version of Ruby. It makes it easier to install or update Ruby versions. If you don't mind, you can run `snap install ruby 2.6.5` to skip the steps below)
- `sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev`- Install rbenv dependencies
- `git clone https://github.com/rbenv/rbenv.git ~/.rbenv` - Install rbenv
- `echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc` - Add rbenv to path
- `echo 'eval "$(rbenv init -)"' >> ~/.bashrc`- Makes sure rbenv loads automatically
- `source ~/.bashrc`- Apply changes to current bash session
- Install `ruby-build`
- `git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build`
- Install ruby 2.6.5
- `rbenv install 2.6.5`
- `rbenv global 2.6.5` - set it as the default
- Install bundler + dependencies
- `gem install bundler`
- `bundle install`
- `bundle exec rake db:create`
- `bundle exec rake db:migrate`

#### Start the app
- Run `bundle exec rails s`
- You're good to go! Visit http://localhost:3000

### Creating a user

- `bundle exec rails c` to run Rails console
- `User.create!(username: "...", password: "...")` The username and password will be hashed.
- If you ever need to change your username/password: `User.first.update!(username: "...", password: "...")`


## Hosting your own

I'd recommend using [Heroku](https://heroku.com) since it's super simple (and free) to
Expand Down