The API is a Rails app running on Heroku.
- Postgresql (10)
- Redis
- Ruby (2.4.4)
With Postgres running, gems installed, and the DB setup (as described in Setup), run:
rails server -p 9000
-
If necessary, install Homebrew.
-
Install a Ruby version management tool. Some options include
rbenv
,rvm
, andruby-install/chruby
. This guide assumes use of rvm:
brew install rvm
- Use your Ruby management tool to install the Ruby version used by this project:
rvm install 2.5.1
- Install postgres:
brew install postgresql
If you already have postgres installed, make sure you're running version 10 by upgrading:
brew upgrade postgresql
brew postgresql-upgrade-database
- Start your database server:
brew services start postgresql
- Clone this repo if you don't already have it:
git clone https://github.com/the-difference-engine/Women-in-Comedy-API.git
cd Women-in-Comedy-API
git checkout qa
- Bundler is a Ruby package manager, like npm. You'll need to install it:
gem install bundler
- Bundler will use the Gemfile and Gemfile.lock to install the package versions you need:
bundle install
If you run into problems installing the pg
gem here, make sure to disable
real-time protection in your anti-virus program. In the future, you may need to
run bundle install
again after git pull
ing to install new and updated
dependencies.
- Rake is a Ruby tool that allows you to execute pre-defined tasks. Here, we'll use it to create database tables and store some test data:
rake db:setup
TBD
To run all tests:
rake spec
TBD
TBD