- Install Homebrew.
- Install rbenv and ruby-build.
brew install rbenv
- Follow further setup instructions (including updating your bash profile) from the link above.
brew install ruby-build
- Install postgres.
brew install postgresql
- Follow further setup instructions displayed after installation.
brew services start postgres
- Install the
bundle
gem if it isn't yet installed.
which bundle || gem install bundle
After cloning the repository and cd
ing into the workspace:
- Install the required ruby version.
rbenv install
- Install the required gems.
bundle install
- Set up the development database and load dummy data.
bin/rake db:create:all
bin/rake db:migrate
bin/rake linksf:import
- Run the development server.
bin/rails s -b 0.0.0.0
Docker Engine >= 1.10 Docker Compose >= 1.6
Follow the Docker installation instructions for your OS.
This is not a full guide to Docker and Docker Compose, so please consult other guides to learn more about those tools.
# Start the database container (in the background with -d)
$ docker-compose up -d db
# Populate the initial development database
$ docker-compose run --rm api rake db:create db:schema:load linksf:import
# Start the Rails development server in the api container (in the foreground)
$ docker-compose up api
# To stop all containers, including background ones
$ docker-compose stop
# Refresh DB
$ docker-compose run --rm api rake db:create db:schema:load linksf:import
# Run Docker container that executes Postman CLI tool named newman
$ docker-compose run --rm postman